0

I am trying to setup an environment where one would upload, and once created would loose deletion and write permissions.

To do so I create a virtual user with the following settings:

local_enable=YES
write_enable=YES

# Default Permissions: File: 400 ; Dir: 500
local_umask=0277
file_open_mode=0677
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty

# Disable chmod
chmod_enable=NO
virtual_use_local_privs=YES

The issue is as the one who uploaded the file remains the owner, he's able to delete the file (even though permissions are set to 400).

How would I be able to make so a user can upload and then not being able to remove it through FTP ?

0

I've finally been able to find a way to achieve this. After looking at the manual for the Nth time, I've managed to find the directive cmds_denied which disable instructions.

In my case, I've set it to: cmds_denied=RMD,DELE.

|improve this answer|||||

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.