设置Samba上写入文件或目录的用户权限


Linux上开放Samba共享目录时,可以通过/etc/samba/smb.conf配置文件的guest account、create mask和directory mask属性,来设置写入共享目录中的文件或目录的用户权限。

[global]  
        workgroup = TUX-NET  
        interfaces = 127.0.0.1 eth0  
        bind interfaces only = true  
        printing = cups  
        printcap name = cups  
        load printers = yes  
        security = share  
        log file =/samba-log/samba.log  
        guest account = root  
        create mask = 777
        directory mask = 777  
  
#============================ Share Definitions ==============================  
[BSP-DATA]  
        comment  = BSP Data  
        path    = /some_path/samba-root  
        writable        = yes  
        browseable      = yes  
        guest ok        = yes

这两个参数不是非要写到global中才有效。也可以单独在分享目录中单独定制。

Archives