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啦

 

转载于:https://www.cnblogs.com/jiangfeilong/p/9954026.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值