Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. ubuntu@server:/test$ getfacl .
  2. # file: .
  3. # owner: samba
  4. # group: samba
  5. user::rwx
  6. user:samba:rwx
  7. user:ubuntu:rwx
  8. group::rwx
  9. mask::rwx
  10. other::r-x
  11. default:user::rwx
  12. default:user:samba:rwx
  13. default:user:ubuntu:rwx
  14. default:group::rwx
  15. default:mask::rwx
  16. default:other::r-x
  17.  
  18. ubuntu@server:/test$ ls -l
  19. total 0
  20. -rw-rwxr--+ 1 samba samba 0 Feb 19 03:40 file1
  21.  
  22. /etc/samba/smb.conf:
  23.  
  24. [Share]
  25. path = /test
  26. browseable = yes
  27. guest ok = yes
  28. read only = no
  29. map archive = no
  30. create mask = 0000
  31.  
  32. ubuntu@server:/test$ sudo systemctl restart smbd.service
  33.  
  34. *Create file2 via Samba*
  35.  
  36. ubuntu@server:/test$ ls -l
  37. total 0
  38. -rw-rwxr--+ 1 samba samba 0 Feb 19 03:40 file1
  39. ----rwx---+ 1 samba samba 0 Feb 19 03:41 file2
  40.  
  41. ubuntu@server:/test$ sudo -u samba touch file3
  42. ubuntu@server:/test$ ls -l
  43. total 0
  44. -rw-rwxr--+ 1 samba samba 0 Feb 19 03:40 file1
  45. ----rwx---+ 1 samba samba 0 Feb 19 03:41 file2
  46. -rw-rw-r--+ 1 samba samba 0 Feb 19 03:42 file3
  47.  
  48. ubuntu@server:/test$ sudo setfacl -b /test
  49. ubuntu@server:/test$ sudo getfacl .
  50. # file: .
  51. # owner: samba
  52. # group: samba
  53. user::rwx
  54. group::rwx
  55. other::r-x
  56.  
  57. *Create file4 via Samba*
  58.  
  59. ubuntu@server:/test$ ls -l
  60. total 0
  61. -rw-rwxr--+ 1 samba samba 0 Feb 19 03:40 file1
  62. ----rwx---+ 1 samba samba 0 Feb 19 03:41 file2
  63. -rw-rw-r--+ 1 samba samba 0 Feb 19 03:42 file3
  64. ---------- 1 samba samba 0 Feb 19 03:43 file4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement