Setup FTP Server On openSUSE 13.1
vsftpd (Very Secure File Transport Protocol Daemon) is a secure, fast FTP server for Unix/Linux systems. In this how-to article, let us see how to setup a basic FTP server using vsftpd on openSUSE 13.1.
Login as root user and Enter the following the following command.
# zypper in vsftpd
Start vsftpd service and make it to start automatically on every reboot.
# systemctl enable vsftpd.service # systemctl start vsftpd.service
Create a folder for ftp users.
# mkdir /srv/ftp
Create a group called ftp-users.
# groupadd ftp-users
Let us create a sample user called unixmen with home directory /srv/ftp and group ftp-users.
# useradd -g ftp-users -d /srv/ftp/ unixmen
Set password for the new user.
# passwd unixmen
Make the ftp home directory /srv/ftp/ accessible by ftp users.
# chmod 750 /srv/ftp/ # chown unixmen:ftp-users /srv/ftp/
Edit file vsftpd.conf,
# nano /etc/vsftpd.conf
Make the changes as shown below.
[...] #Uncomment and Set YES to enable write. write_enable=YES [...] # Uncomment and Set banner name for your website ftpd_banner=Welcome to Unixmen FTP service. [...] # Uncomment ls_recurse_enable=YES [...] # Uncomment and set YES to allow local users to log in. local_enable=YES [...] # To disable anonymous access, set NO. anonymous_enable=NO [...] # Uncomment to enable ascii download and upload. ascii_upload_enable=YES ascii_download_enable=YES [...] ## Add at the end of this file ## use_localtime=YES
Save and exit file.
Test FTP Server Locally
First let us try to login to our FTP server as shown below.
# ftp localhost Trying ::1:21 ... Connected to localhost. 220 (vsFTPd 3.0.2) Name (localhost:root): unixmen 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp>
As you in the above output, we will be able to login to ftp server using unixmen user.
Test FTP Server Remotely
By default openSUSE built-in firewall won’t allow to login to FTP from remote systems. So let us allow vsftpd service through suse firewall. To do that go to Yast -> Security and Users -> Firewall.
Now try to connect from a remote system.
I tried to login to FTP server from my ubuntu desktop.
sk@sk:~$ ftp 192.168.1.53 Connected to 192.168.1.53. 220 (vsFTPd 3.0.2) Name (192.168.1.53:sk): unixmen 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp>
As you see in the above output, I will be able to connect to FTP server. If you doesn’t allow the vsftpd service through firewall you will get a Connection timed out error.
Connect from Browser
Open up your browser and Navigate to ftp://ip-address/. Enter the ftp user name and password.
Working from command-line mode might be little bit annoying to newbies. So let us install a graphical FTP client called Filezilla to get things done quite easier:
Mostly all distribution will have filezilla client in their official repository. To install filezilla on Linux based systems enter the following command:
On Ubuntu based systems:
$ sudo apt-get install filezilla
On Fedora/Redhat systems:
$ sudo yum install filezilla
# zypper in filezilla
After installing filezilla open it. Enter the ftp server IP address, user name and password and click quickconnect.
For added security, you can restrict FTP access to certain users by adding them to /etc/vsftpd.chroot_list file.
Edit vsftpd.conf file,
Make the changes as shown below.
[...] # Uncomment and set YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list [...]
Create file /etc/vsftpd.chroot_list,
Add the users that you want to give access to FTP server. I added the user unixmen.
Restart ftp service.
# systemctl restart vsftpd.service
Now you will be able to connect to FTP server with users who are listed in the chroot list file.
If users other than in the chroot list want to access FTP server, they will get the following error.
500 OOPS: could not read chroot() list file:/etc/vsftpd.chroot_list ftp: Login failed
That’s it for now. Your FTP server is ready to use. Enjoy!
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX : Wow! Early last week it was all over the internet, if you haven't heard it yet then this is the t...0 comments |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- How To "Fix E: Could not open file /var/lib/dpkg/status" : QUESTION: I get the following error when I use sudo apt-get update: E: Could not open file /var/...0 comments |
- Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 : Updated January 12, 2014 LAMP is a combination of operating system and open-source software stack. ...0 comments |
- Install Sublime Text 3 In Fedora Easily With Fedy
- Grive: An Unofficial, Open Source Linux Client For Google Drive
- Install nSnake Game In Terminal
- How To “Fix E: Could not open file /var/lib/dpkg/status”
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .