Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. sftp webadm@<ip>:
  2. webadm@<ip>'s password:
  3. Connected to <ip>.
  4. Changing to: /
  5. sftp> ls
  6. remote readdir("/"): Permission denied
  7. sftp>
  8.  
  9. /etc/ssh/sshd_config
  10. Subsystem sftp internal-sftp
  11. Match Group sftponly
  12. ChrootDirectory %h
  13. ForceCommand internal-sftp
  14. AllowTcpForwarding no
  15. PermitTunnel no
  16. X11Forwarding no
  17.  
  18. useradd webadm
  19. passwd webadm
  20. groupadd sftponly
  21. gpasswd -a webadm sftponly
  22. usermod -g sftponly webadm
  23. groups webadm
  24. webadm : sftponly
  25.  
  26. ll /home/
  27. drwx------+ 5 root root 4096 May 31 23:49 webadm
  28. ll /home/webadm/
  29. -rw-r--r--. 1 webadm sftponly 5 May 31 23:34 test
  30. getfacl /home/webadm/
  31. getfacl: Removing leading '/' from absolute path names
  32. # file: home/webadm/
  33. # owner: root
  34. # group: root
  35. user::rwx
  36. group::---
  37. mask::---
  38. other::---
  39.  
  40. setfacl -m u:webadm:rwx /home/webadm/
  41.  
  42. Match User webadm
  43. ChrootDirectory /home/webadm
  44. AllowAgentForwarding no
  45. X11Forwarding no
  46. AllowTcpForwarding no
  47. #PermitTTY no
  48. ForceCommand internal-sftp
  49. PermitTunnel no
  50.  
  51. Accepted password for webadm from <ip> port 19669 ssh2
  52. pam_unix(sshd:session): session opened for user webadm by (uid=0)
  53. sshd_selinux_copy_context: getcon failed with Permission denied [postauth]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement