Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening FTP to Public Uploads

Status
Not open for further replies.

cwolford

Technical User
May 2, 2000
2
US
I have just set up a proxy server running Mandrake version of Linux. It is running the proxy, HTTP and FTP servers. I can access the HTTP and FTP server parts but the FTP server will not allow me to upload files to it (even when using a valid used ID). How do I open the FTP server up to allow public uploads? What file do I edit? What utility do I use?
 
You need to edit the /etc/ftpaccess file and specify where uploads are allowed.&nbsp;&nbsp;The following is taken from the ftpaccess man page:<br><FONT FACE=monospace><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Directories are matched on a best-match basis. For example:<br>upload&nbsp;&nbsp;/home/ftp&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no&nbsp;&nbsp;&nbsp;nodirs<br>upload&nbsp;&nbsp;/home/ftp&nbsp;&nbsp;/incoming&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes&nbsp;&nbsp;ftp&nbsp;&nbsp;daemon&nbsp;&nbsp;0666<br>upload&nbsp;&nbsp;/home/ftp&nbsp;&nbsp;/incoming/gifs&nbsp;&nbsp;yes&nbsp;&nbsp;jlc&nbsp;&nbsp;guest&nbsp;&nbsp;&nbsp;0600&nbsp;&nbsp;nodirs<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This would only allow uploads into /incoming and<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/incoming/gifs. Files that were uploaded to /incoming would be<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;owned by ftp:daemon and would have permissions of 0666. File<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uploaded to /incoming/gifs would be owned by jlc:guest and have<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;permissions of 0600.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The dirs and nodirs keywords can be specified to allow or<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disallow the creation or removal of subdirectories. The dirs<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keyword is assumed by default if neither dirs nor nodirs is<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;specified. In the above example, creation and removal of<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directories would only be allowed in /incoming.<br></font><br><br>Be <b>very</b>careful if you're setting this up on a public facing server, because if you configure this incorrectly, your server could be left wide open to abuse...&nbsp;&nbsp;Start off with a good read of the man page for ftpaccess, then look at the documentation in /usr/doc/wu-ftpd-2.6.0<br><br>Hope this helps :)
 
You didn't mention what ftp server you were running. proftpd has a config file in /etc/pam.d. Check their website for instructions on setting it up. It seems to be a bit more secure than wu-ftp. I will be switching to it for our machines. <p>Michael Regan<br><a href=mailto:mregan@bccs-ca.com>mregan@bccs-ca.com</a><br><a href= Cat Computer Systems</a><br>Black Cat Computer Systems build Linux servers and work<br>
stations for the small office. Our systems feature the AMD<br>
line of processors. They are an excellent balance of price,<br>
performance and reliability.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top