0
我在Debian Wheezy上使用Samba 3.6.6。桑巴不允许强制用户
我希望能够使用我的macbook在我的开发服务器上更改www文件。 因此,我设置了samba并为/ var/www目录创建了一个共享。
我将用户bart & root添加到samba连接。然后使用命令K连接,然后连接smb://192.168.2.100(我的samba服务器)。
由于apache使用www-data作为www文件的用户和组,我在samba中使用强制用户和强制组来防止权限错误。
但它确实会强制组www-data,但不强制用户。我创建的每个文件都由组www-data中的根拥有。
为了寻找错误,我在/ var/log/samba中记录了日志,并且在重新启动samba服务时仅在log.smbd中发现错误。看到这里的日志:
smbd version 3.6.6 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/09/23 11:14:22.601031, 0] printing/print_cups.c:110(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/09/23 11:14:22.602215, 0] printing/print_cups.c:487(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
这里是我的smb.conf:
[global]
server string = %h server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
[homes]
comment = Home Directories
valid users = %S
create mask = 0700
directory mask = 0700
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[www]
comment = www
path = /var/www/
valid users = bart, root
admin users = bart, root
write list = bart, root
force user = www-data
force group = www-data
read only = No
我甚至尝试添加WWW的数据,以有效的用户以及管理员用户和写入列表。这当然没有任何效果。
你能帮我吗?提前致谢!
告诉我为什么它应该被拒绝? – BonifatiusK