Tuesday, August 25, 2009

How to setup FTP server in slackware

There are mainly two kind of ftp (File transfer Protocol)service available on slackware 
The first one is proFTPD 
and second one is vsftpd 
Here I will tell you how to install vsftpd(very secure ftp daemon) in slackware.Both of these packages comes with slackware.you can check it with the command
root@slackware:~# ls /var/log/packages/ | grep vsftpd

this will show you an output like this

vsftpd-2.0.7-i486-1

Now open the vsftpd.conf in any text editor

root@slackware:~# gvim /etc/vsftpd.conf

comment out the following  line
 
#listen=YES
The vsftpd service can be started by two ways:
the first one is standalone mode
In standalone mode ,to start the service just type
root@slackware:~#/usr/sbin/vsftpd 

The second one is via -inetd.In order to start the service via-inetd
just open the file /etc/inetd.conf and comment out the
following line:
  # Very Secure File Transfer Protocol (FTP) server.  
ftp stream tcp nowait root /usr/sbin/tcpd vsftpd   
 
 
Now type find the pid of inetd and kill it.

root@slackware:~#ps x |grep inetd
root@slackware:~#kill -HUP   
 
 Now restart the super daemon service 
root@slackware:~$ /etc/rc.d/rc.inetd restart 

The next job is to create a ftp user You can create it by using command
[root@slackware ] /# mkdir /home/ftp
[root@slackware ] /# useradd -d /home/ftp ftpuser -s /dev/null 
 [root@slackware] /# passwd ftpuser

  • The mkdir command will create the ftp directory under the /homeFTP users' home directories we'll have on the server. directory to handle all
  • The useradd command will add the new user named ftpuserto our Linux server.
  • Finally, the passwd command will set the password for this user ftpuser
Now give permission to the ftp directory so that any one can download files from this ftp server.
[root@slackware ]#chmod -R 777 /home/ftp  
For checking just type ftp://localhost/ in your web browser.


1 comment:

  1. I found this blog in search results while i am searching for aws jobs in hyderabad. Thank You admin sharing for this information. Which is useful for me.

    ReplyDelete