Pure-ftpd - how to disallow download and allow only upload.
Hi all,
I have successfully configured pure-ftpd with mysql authentication on a Centos machine and I am able to login without any troubles to the server via ftp.
Actual problem:
I want to configure a user account "ftpuser" who *can* upload but he should *not* be able to download anything from the server.
Download/upload works fine if I give 777 permission for the user's chrooted home directory. However, I am unable to prevent downloading while uploading is still allowed. Upon setting 311 permission for the user's chrooted home directory, I was able to do just the opposite of what I wanted; that is: I can download(though I cannot "ls" any files) but I cannot upload anything. Upload returns the following error:
---------------------------------------------------
ftp> put readme.pdf
local: readme.pdf remote: readme.pdf
227 Entering Passive Mode (207,154,201,2,25,70)
553 Rename/move failure: Permission denied
ftp>
---------------------------------------------------
At present the chrooted home directory for "ftpuser" looks like this:
# ls -ld ftpuser
d-wx--x--x 2 root root 4096 Apr 2 02:17 ftpuser
Googled around for quite some time, but I could not find any appropriate solution for this. Please post your thoughts on this.
Thanks in advance.
Kind regards,
Anand
|