Written by Zack MIlls
|
Thursday, 10 September 2009 12:50 |
Go with proftpd, this will set up a server with access to "/home/shareftp" and give only a user access to a user called "ftpuser"
This is the process I used on a couple Ubuntu Servers to Get Running Fast
- Install proftpd in standallon mode
sudo apt-get install proftpd
- Next edit the shells file and add one line of code
- However /usr/bin/false needs to be added to /etc/shells to make it a valid login shell. Without this when you try to ftp as a user that has a shell of /usr/bin/false you’ll get a “530 Login incorrect. Login failed.” regardless of whether you get the password right or not.
sudo nano /etc/shells # add line "/bin/false"
- Add a User
sudo useradd ftpuser -p userftp_password -d /home/shareftp -s /bin/false
- Set User Password
sudo passwd ftpuser
- You will be asked to enter the password twice
userftp_password
- Edit proftpd.conf
- sudo nano /etc/proftpd/proftpd.conf
- Adjust "ServerName"
- Add "UseReverseDNS off" I have it after "ShowSymlinks"
- Adjust "DefaultRoot /home/shareftp"
- Adjust "RequireValideShell off"
- Adjust "PassivePorts 55555 55655"
- I used all other default values I will upload a sample file to this article.
- Edit File access rights
cd /home/shareftp sudo find . -type d -exec chmod 777 {} \; sudo find . -type f -exec chmod 777 {} \;
- Restart Server
sudo /etc/init.d/proftpd restart
This got me up and running, I could add users and lock them into to sub-folders without much hassle other than repeating steps 3 and 4 with a different path.
|
Last Updated on Thursday, 10 December 2009 15:48 |