Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chroot_local_user=YES
- usermod --home /var/www/ username
- chroot_local_user=YES
- local_root=/ftphome/$USER
- user_sub_token=$USER
- mkdir -p /ftphome/{test,user1,user2}
- chmod 770 -R /ftphome
- chown -R ftp. /ftphome
- usermod -G ftp test
- [root@mail tmp]# ftp localhost
- Connected to mail.linuxian.local.
- 220 (vsFTPd 2.0.5)
- 530 Please login with USER and PASS.
- 530 Please login with USER and PASS.
- KERBEROS_V4 rejected as an authentication type
- Name (localhost:root): test
- 331 Please specify the password.
- Password:
- 230 Login successful.
- Remote system type is UNIX.
- Using binary mode to transfer files.
- ftp> mput vhosts
- mput vhosts?
- 227 Entering Passive Mode (127,0,0,1,146,41)
- 150 Ok to send data.
- 226 File receive OK.
- 24 bytes sent in 3.3e-05 seconds (7.1e+02 Kbytes/s)
- ftp> ls -rlt
- 227 Entering Passive Mode (127,0,0,1,97,90)
- 150 Here comes the directory listing.
- -rw-r--r-- 1 787 787 24 Oct 11 19:57 vhosts
- 226 Directory send OK.
- ftp> 221 Goodbye.
- usermod --home /var/www/ username
- chroot_local_user=YES
- local_root=/home/$USER/www-data
- user_sub_token=$USER
- # chmod a-w /home/$USER/www-data
Add Comment
Please, Sign In to add comment