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

I have made a ftp directory I want that virtual users can create and update folders and files but they can not delete them. how do I suppose to do that? I have created this ftp by vsftp in fedora 16 platform.

Thank you,

share|improve this question

migrated from stackoverflow.com Mar 29 '12 at 6:41

This question came from our site for professional and enthusiast programmers.

2  
So users can "modify" files to zero length, but they cant delete them? I think the write bit authorizes both file modification and unlinking - and it can't be seperated. –  user1131467 Mar 28 '12 at 22:39

2 Answers 2

up vote 3 down vote accepted

You can instruct vsftpd to no longer honor the DELE and RMD commands:

# Disable delete commands
cmds_denied=DELE,RMD

Though user1131467's concern still stands -- if the users can modify files, they can truncate the files or overwrite them with garbage. (Well, the chattr(1) append only attribute can enforce append-only behavior, but this is far from an ideal solution.)

share|improve this answer
    
+1 Other FTP daemons have similar functionality. –  Zoredache Mar 29 '12 at 21:45

You can find your answer in this page: http://vsftpd.beasts.org/vsftpd_conf.html

look for the value "file_open_mode" to set the umask for the uploded files to the desired value to prevent the write permission.

the default value is 0666, in your case it may be 0440. (do not forget the leading 0).

share|improve this answer
    
you might also need to do something to prevent them from using chmod. –  Falcon Momot Nov 19 at 7:50

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.