Results 1 to 10 of 10
hi everybody,
How cud i stop downloading files from FTP and allow uploading files in FTP.
Thanks & reg,...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-14-2009 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 26
restrict file download not upload
hi everybody,
How cud i stop downloading files from FTP and allow uploading files in FTP.
Thanks & reg,Last edited by utpalsarkar; 03-14-2009 at 01:57 PM. Reason: greetings
- 03-14-2009 #2
You need to be more specific please, are you running an FTP server or something? What exactly are you attempting to do here?
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
I'd rather be lost at the lake than found at home.
- 03-18-2009 #3Just Joined!
- Join Date
- Jan 2008
- Posts
- 26
hi Mike,
Thanks 4 response.
In my ftp I want 2 allow any user or particular user to upload the file but don't want to allow download the files.
Is it possible ? plz help me.
Thanks,
- 03-18-2009 #4Linux Newbie
- Join Date
- Sep 2004
- Location
- UK
- Posts
- 161
Don't know is any FTPD does that. Your going to have to view the situation as a learning experience/opportunity, Download the source for vsftpd or other and disable the mget and get command(s), should be realitively easy.
In a world without walls and fences, who needs Windows and Gates?
- 03-20-2009 #5Just Joined!
- Join Date
- Jan 2008
- Posts
- 26
actually i faced this question in an interview
regards,
- 03-20-2009 #6Just Joined!
- Join Date
- Jan 2008
- Posts
- 26
i have one more question i.e.
I want to restrict file upload/download size in ftp. i.e. file more thank 10mb could not be uploaded or downloaded also. If this is possible, please let me know.
Thanks & regards,
- 03-20-2009 #7Just Joined!
- Join Date
- Oct 2008
- Location
- Cochin
- Posts
- 12
upload-only directory
You can use the <Limit> directive for this in the FTP configuration file :
-----------------------------------------------------------
<Directory /path/to/uploads>
<Limit ALL>
DenyAll
</Limit>
<Limit CDUP CWD XCWD XCUP>
AllowAll
</Limit>
<Limit STOR STOU>
AllowAll
</Limit>
</Directory>
---------------------------------------------------------
The first <Limit ALL> section blocks use of all FTP commands within the /path/to/uploads directory. Having denied use of all commands, we then proceed to define which commands can be used. The CDUP and CWD commands (and their X variants) should be allowed so that clients can change into and out of the directory. Next, STOR and STOU are allowed, so that clients can actually upload files into the directory (assuming that the filesystem permissions allow for the client to write files in the directory as well). The WRITE command group might have been used, but that also allows things like creating and deleting subdirectories, which is usually not wanted in an upload-only configuration.
Reference : ProFTPD mini-HOWTO - Configuring <Limits>
- 03-20-2009 #8Just Joined!
- Join Date
- Oct 2008
- Location
- Cochin
- Posts
- 12
Well, u didnt specify what FTP server you are running..
- 03-28-2009 #9Just Joined!
- Join Date
- Jan 2008
- Posts
- 26
Its vsftp is running on my server.
Thanks,
- 03-28-2009 #10Linux Newbie
- Join Date
- Sep 2004
- Location
- UK
- Posts
- 161
Try playing with anon_umask and local_umask (eg make all the uploaded files non-readable ie premissions = 0000), the directory can be RW but the server should change the premissions after an upload so files are never readable. Never tried it but that looks like a logical use of the anon_umask and local_umask parameters.
See man vsftpd.confIn a world without walls and fences, who needs Windows and Gates?


Reply With Quote
