共享只读群组文件夹(需授权)

来自Ubuntu中文
跳到导航跳到搜索

共享只读群组文件夹(需授权)

sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • 搜寻这一行文字
...
; security = user
...
  • 用下面这几行取代
security = user
username map = /etc/samba/smbusers
  • 将下列几行新增到文件的最后面
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart