-1

How to prevent downloading of files in pureftpd server?

Solution

Thanks. I do this:
# cd /etc/pure-ftpd/conf
# echo "yes" > CallUploadScript
Edited /etc/default/pure-ftpd-common, changed UPLOADSCRIPT directive:
UPLOADSCRIPT=/etc/pure-ftpd/chmod_upload.sh
And created chmod_upload.sh in /etc/pure-ftpd with such content:
#!/bin/sh chmod u-r "$1"

  • The question in its current form is not really clear: what do you wan to achieve? I assume you want to selectively disallow files from being downloaded? Is this behaviour intended for every user that logs in, or only some, etc. – Aron Rotteveel Nov 26 '11 at 19:12
  • I want completely prevent downloading for all ftp users (authorized, anonymous, all users). – andser Nov 27 '11 at 9:25
3

One way is to set unix permissions on the folders so that files are not readable by the user that should not be allowed to download files.

One other way might be to chroot the user inside his home directory so he can only work inside his home directory.

For a more detailed answer, you'd have to ask a more detailed question detailing your setup and exactly what you want to do.

| improve this answer | |
4

The best way would be to not expose them via pureftpd.

| improve this answer | |
  • Sometimes the simplest solutions are the best :) – Toby Allen Nov 26 '11 at 22:59

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