1

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,

  • 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
3

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.)

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

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).

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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