当前位置: 技术问答>linux和unix
samba配置问题
来源: 互联网 发布时间:2016-06-19
本文导语: 现在windows下可以浏览samba共享目录里的文件,可是就是无法写入。 详细改了smb.conf发现在smb.conf 里写了 writable = yes 可是在用testparm命令是却显示不出这行。。。 为何,请指点!!! 下testparm命令后的结果: [global] ...
现在windows下可以浏览samba共享目录里的文件,可是就是无法写入。
详细改了smb.conf发现在smb.conf 里写了 writable = yes
可是在用testparm命令是却显示不出这行。。。
为何,请指点!!!
下testparm命令后的结果:
[global]
workgroup = MYGROUP
server string = Samba Server
security = SHARE
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = No
guest ok = Yes
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /usr/spool/samba
guest ok = No
printable = Yes
browseable = No
[opt]
comment = opt directory
path = /opt
read only = No
create mask = 0777
directory mask = 0777
[root]
comment = root directory
path = /root
read only = No
create mask = 0777
directory mask = 0777
smb.conf实际写的内容:
05 # A publicly accessible directory, but read only, except for people in
206 # the "staff" group
207 ;[public]
208 ; comment = Public Stuff
209 ; path = /home/samba
210 ; public = yes
211 ; writable = yes
212 ; printable = no
213 ; write list = @staff
214
215 [opt]
216 comment = opt directory
217 path = /opt
218 writable = yes
219 browseable = yes
220 guest ok = yes
221 create mask = 0777
222 directory mask = 0777
223
224 [root]
225 comment = root directory
226 path = /root
227 writable = yes
228 browseable = yes
229 guest ok = yes
230 create mask = 0777
231 directory mask = 0777
详细改了smb.conf发现在smb.conf 里写了 writable = yes
可是在用testparm命令是却显示不出这行。。。
为何,请指点!!!
下testparm命令后的结果:
[global]
workgroup = MYGROUP
server string = Samba Server
security = SHARE
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = No
guest ok = Yes
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /usr/spool/samba
guest ok = No
printable = Yes
browseable = No
[opt]
comment = opt directory
path = /opt
read only = No
create mask = 0777
directory mask = 0777
[root]
comment = root directory
path = /root
read only = No
create mask = 0777
directory mask = 0777
smb.conf实际写的内容:
05 # A publicly accessible directory, but read only, except for people in
206 # the "staff" group
207 ;[public]
208 ; comment = Public Stuff
209 ; path = /home/samba
210 ; public = yes
211 ; writable = yes
212 ; printable = no
213 ; write list = @staff
214
215 [opt]
216 comment = opt directory
217 path = /opt
218 writable = yes
219 browseable = yes
220 guest ok = yes
221 create mask = 0777
222 directory mask = 0777
223
224 [root]
225 comment = root directory
226 path = /root
227 writable = yes
228 browseable = yes
229 guest ok = yes
230 create mask = 0777
231 directory mask = 0777
|
我的贴给你参考哈:
[root@centos samba]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[tmp]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
passdb backend = tdbsam
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[tmp]
path = /tmp
read only = No
vi /etc/samba/smb.conf
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
security = user
passdb backend = tdbsam
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[tmp]
path = /tmp
public = no
writable = yes
[root@centos samba]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[tmp]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
passdb backend = tdbsam
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[tmp]
path = /tmp
read only = No
vi /etc/samba/smb.conf
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
security = user
passdb backend = tdbsam
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[tmp]
path = /tmp
public = no
writable = yes
|
|
不是深入研究的话可以在图形界面里面改,会方便一点
|
“browseable = No ”
应该是yes吧
应该是yes吧
|
path="***"
available=yes
browsable=yes
public=yes
writable=yes
path: chmod 777 path
available=yes
browsable=yes
public=yes
writable=yes
path: chmod 777 path
|
估计你本身的Samba的目录权限的问题
chmod 777 目标path
chmod 777 目标path
|
同意
|
[myshare]
comment = share
path = /home/share
valid users = testuser wqs
public = yes
writable = yes
printable = no
Create mode = 0777
Create mask = 0777
directory mode = 0777
comment = share
path = /home/share
valid users = testuser wqs
public = yes
writable = yes
printable = no
Create mode = 0777
Create mask = 0777
directory mode = 0777
|
我的现在也是这个问题,现在xp用户访问我的fc10的共享目录时,可以游览,可以将共享目录中的内容复制到本地,但是不可以往共享目录中写内容,