Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › ftp server ubuntu desktop
New Posts  All Forums:Forum Nav:

ftp server ubuntu desktop

post #1 of 4
Thread Starter 
Hi does anyone know of a ftp server I can use in ubuntu desktop I would like to give the user a folder on my second drive and keep the user in that folder coz others I found give access outside the folder, and if possible create users just for ftp and second question I managed to create a shared folder using smb and share it with multiple users now is there a way to share the folder with multiple groups example share folder A with group admin and group users and if possible give full permissions to group admin but read only to group users
post #2 of 4
Don't use FTP. Use SFTP - it's easier to set up and more secure.
post #3 of 4
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

Don't use FTP. Use SFTP - it's easier to set up and more secure.
Thank you for your reply do you know of a program or a tutorial sorry for these questions but I am new to linux
post #4 of 4
Quote:
Originally Posted by chrismallia View Post

Thank you for your reply do you know of a program or a tutorial sorry for these questions but I am new to linux

Change bob* on the first line to read the username of who you want SFTP access (cannot be the same user name as someone already set up as a user on your machine), then paste the following code line by line (as some commands will be interactive). Please make sure you do copy/paste each line carefully as there is the potential to do damage if you do something incorrectly:
Code:
export sftpuser='bob'

# this sets up your SSH server securely
sudo apt-get install openssh-server
echo "AllowGroups sftponly" | sudo tee -a /etc/ssh/sshd_config
echo -e "Match Group sftponly\n    ChrootDirectory /home/sftp/%u\n    ForceCommand internal-sftp\n    AllowTcpForwarding no\n    X11Forwarding no"  | sudo tee -a /etc/ssh/sshd_config
sudo service ssh restart

# this sets your user up (as $sftpuser - as you defined at the start of this code)
sudo mkdir -p /home/sftp/$sftpuser/home
sudo useradd -g sftponly -s /bin/false -d /home $sftpuser
echo "You need to input whatever password you want this users FTP access to be"; sudo passwd $sftpuser
sudo chown $sftpuser:sftponly /home/sftp/$sftpuser/home

Now you need to set up port forwarding on your router, port 22.




* eg the first line could be changed to:
Code:
export sftpuser='dave'




Now you should have SFTP set up (most FTP clients should support SFTP - eg Filezilla), with only one user allowed to access it and s/he will only have access to that one folder in /home/sftp/username/home.
Edited by Plan9 - 10/7/13 at 6:46am
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › ftp server ubuntu desktop