Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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"

share|improve this question

migrated from stackoverflow.com Nov 26 '11 at 18:47

This question came from our site for professional and enthusiast programmers.

closed as not constructive by MDMarra, mailq, Ben Pilbrow, Iain, Ward Nov 27 '11 at 5:06

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
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

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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

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