首先当然是要安装samba了,呵呵:
sudo apt-get install samba
sudo apt-get install smbfs
下面我们来共享群组可读写文件夹,假设你要共享的文件夹为: /home/ray/share
首先创建这个文件夹
mkdir /home/ray/share
chmod 777 /home/ray/share
备份并编辑smb.conf允许网络用户访问
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
将下列几行新增到文件的最后面,假设允许访问的用户为:newsfan。而文件夹的共享名为 Share
[Share]
comment = Shared Folder with username and password
path = /home/ray/share
public = yes
writable = yes
valid users = newsfan
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
available = yes
browseable = yes