Basic Setting Proftp server and creating ftp account for a user who should login to some other directory other than home directory by default.


Install ProFTPD server

Type the following command as root user:
# yum install proftpd
Start ProFTPD when the system reboot:
# chkconfig --level 3 proftpd on
To start proftpd ftp service, enter:
# service proftpd start
To Stop proftpd ftp server, enter:
# service proftpd stop
To restart proftpd ftp service, enter:
# service proftpd restart
To reload the configuration file, enter:

# service proftpd reload

====================================================

Edit the file /etc/passwd

In the file search for the desired username and edit the default path to the current directory to which he should login

eg;

vel:x:501:502::/home/vel:/bin/bash

change the path of the home directory

vel:x:501:502::/path/to/current/directory:/bin/bash

Then set the necessary permission to the default directory

Either add this user to the group of that directory or change the ownership of the default directory to the new user ownership

===================================================

Edit the /etc/proftp.conf file

Check for the line DefaultRoot and edit or add new line as

DefaultRoot  /path/to/default/directory/  username

eg

DefaultRoot /var/www/html/modules/imageupload/  vel

save the file and restart the proftp

service proftpd restart

Then check from the client software of ftp..


Advertisements
Published in: on March 12, 2010 at 11:06 pm  Comments Off on Basic Setting Proftp server and creating ftp account for a user who should login to some other directory other than home directory by default.  
%d bloggers like this: