1 安装 view plain copy
- sudo apt-get install samba
2 配置
打开Samba配置文件: view plain copy
- sudo gedit /etc/samba/smb.conf
. 创建共享目录
$ sudo mkdir -p /home/share
一般来说,该目录的权限为755,将其改为777之后,Owner之外的其他用户才有权限写入。
$ sudo chmod 777 /home/share
备份原配置文件
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
在其最后添加: view plain copy
- [share]
path = /home/gaojs/work
# valid users = share//不要指定共享用户
available = yes
browseable = yes
writable = yes
public = yes
- sudo useradd share
- sudo smbpasswd -a share <