HOWTO Setup vsftpd: Difference between revisions

From Research
Jump to navigation Jump to search
Jjaythomas (talk | contribs)
No edit summary
Jjaythomas (talk | contribs)
No edit summary
Line 35: Line 35:




CD to /home/<user> and create a symbolic link to /var/www as this is the public html folder.


ln -s /var/www www


change ownership /var/www to user
'''To set up a user(s) to have FTP access to a web directory'''


chown -R <user> /var/www


Change to 755 permissions
vi /etc/passwd


chmod -R 755 /var/www
UserName:x:1001:1002::/var/www/www.web.iat.sfu.ca/:/bin/bash
 
groupadd ftpaccess
 
usermod -g ftpaccess UserName
 
chmod -R 775 www.web.iat.sfu.ca/
 
chgrp -R ftpaccess www.web.iat.sfu.ca/
 
/etc/init.d/apache stop start
 
/etc/init.d/vsftpd stop start

Revision as of 01:29, 19 December 2007

emerge --sync

emerge -v vsftpd

cp /etc/vsftpd/vsftpd.conf.example /etc/vsftpd/vsftpd.conf

vi /etc/vsftpd/vsftpd.conf

file_open_mode=0666

local_umask=0022

virtual_use_local_privs=YES

anonymous_enable=NO

local_enable=YES

write_enable=YES

idle_session_timeout=600

ascii_upload_enable=NO

ascii_download_enable=NO


data_connection_timeout=120

rc-update vsftpd add default

/etc/init.d/vsftpd start

  • check for the presence of home directories, which vsftp uses as default



To set up a user(s) to have FTP access to a web directory


vi /etc/passwd

UserName:x:1001:1002::/var/www/www.web.iat.sfu.ca/:/bin/bash

groupadd ftpaccess

usermod -g ftpaccess UserName

chmod -R 775 www.web.iat.sfu.ca/

chgrp -R ftpaccess www.web.iat.sfu.ca/

/etc/init.d/apache stop start

/etc/init.d/vsftpd stop start