samba配置只读和可以写入的共享
编辑smb.conf
1.在[global]中
找到
security =
将其改为
security = share
2. 在文件中加入自定义的共享目录
[attachment]
path=/data/attachment
public = yes
only guest = no
writable = yes \\允许写入
3.重启samba
service smb restart
--可写的共享
在smb.cnf 中添加结点,配置如下:
[data] comment = share file path=/data/share public = yes only guest = no writable = yes
然后将共享的目录权限设为777
chmod 777 /data/share
关闭SELIUNX:
[root@bogon samba]# getenforce Enforcing [root@bogon samba]# setenforce 0 [root@bogon samba]# getenforce Permissive