Guest User

Untitled

a guest
Nov 17th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. chroot_local_user=YES
  2.  
  3. usermod --home /var/www/ username
  4.  
  5. chroot_local_user=YES
  6. local_root=/ftphome/$USER
  7. user_sub_token=$USER
  8.  
  9. mkdir -p /ftphome/{test,user1,user2}
  10. chmod 770 -R /ftphome
  11. chown -R ftp. /ftphome
  12. usermod -G ftp test
  13.  
  14. [root@mail tmp]# ftp localhost
  15. Connected to mail.linuxian.local.
  16. 220 (vsFTPd 2.0.5)
  17. 530 Please login with USER and PASS.
  18. 530 Please login with USER and PASS.
  19. KERBEROS_V4 rejected as an authentication type
  20. Name (localhost:root): test
  21. 331 Please specify the password.
  22. Password:
  23. 230 Login successful.
  24. Remote system type is UNIX.
  25. Using binary mode to transfer files.
  26. ftp> mput vhosts
  27. mput vhosts?
  28. 227 Entering Passive Mode (127,0,0,1,146,41)
  29. 150 Ok to send data.
  30. 226 File receive OK.
  31. 24 bytes sent in 3.3e-05 seconds (7.1e+02 Kbytes/s)
  32. ftp> ls -rlt
  33. 227 Entering Passive Mode (127,0,0,1,97,90)
  34. 150 Here comes the directory listing.
  35. -rw-r--r-- 1 787 787 24 Oct 11 19:57 vhosts
  36. 226 Directory send OK.
  37. ftp> 221 Goodbye.
  38.  
  39. usermod --home /var/www/ username
  40.  
  41. chroot_local_user=YES
  42. local_root=/home/$USER/www-data
  43. user_sub_token=$USER
  44.  
  45. # chmod a-w /home/$USER/www-data
Add Comment
Please, Sign In to add comment