samba 设置文件的读写权限

原文:https://blog.csdn.net/lan120576664/article/details/50396511

打开配置文件

sudo pico /etc/samba/smb.conf

[AA]
  comment = AA
  path = /samba/A
  public = no
  valid users = b02,b01,c01,a01,@A
  write list = @A 
  printable = no
 
[BB]
  comment = BB
  path = /samba/B
  public = no
  valid users = a01,c01,b01,@B
  printable = no
  write list = @B
    
[CC]
  comment = CC
  path =  /samba/C
  public = no
  valid users = a01,b01,c01,@C
  printable = no
  write list = @C
 
[public-readonly]
  comment = public-readonly
  path = /samba/public-readonly
  public = yes
  read only = yes
 
 
[share-rw]
  comment = share-rw
  path = /samba/share-rw
  public = yes
  writable = yes
#sudo chmod 1777 /samba/share-rw

置好了之后,建立知道的文件夹,然后开放文件夹权限。类似

sudo mkdir kkkk
sudo chmod 777 kkkk

chom ++777 +文件名.后缀

  最后就得重新重启samba啦

 最后就得重新重启samba啦

 

posted @ 2018-11-13 19:05  江期玉  阅读(17124)  评论(0编辑  收藏  举报