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,
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityI 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,
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.)
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).