Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have to upload some videos files for streaming purpose. While uploading the videos as a ftp user, it will have the ftp user and group permission. But now in my case, the files uploaded by the ftp user should have root user and group permission. Is there any way to upload in such a way?.. Now I am using vsftpd

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

you can re-configure your ftpd to run as root, and there for all files written by ftpd will have root permissions, although this is not very recommended.

root user can access files that are owned by ftp user, there is no need to change owner ship if root is the one who will be opening those files.

share|improve this answer
add comment

You might be better leaving the ftp daemon running as it is and instead post processing by running a little shell script using root's crontab that checks for new files in the ftp upload folder and runs a chown command if it finds any, or just chown's the whole directory and its contents if you like, once a minute.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.