/etc/samba/smb.conf:
[global]
workgroup = w
server string = server
security = user
load printers = no
debug level = 10
log file = /var/log/samba/%m.log
max log size = 5000
dns proxy = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
unix extensions = no
# if I comment above line, I can write to /home/shareuser/writable
follow symlinks = yes
wide links = yes
[writable]
comment = test
writable = yes
valid users = shareuser
path=/home/shareuser/writable
共有ユーザー有効なpasswdとsmbpasswd(-a)が必要です。
次のように共有をマウントします。mount -t cifs //server/writable mountpoint/ -o username=shareuser
それでunix extensions = yes
共有に書き込むことができます。
を使用すると共有に書き込むことがunix extensions = no
できません。
どんな助けにも感謝します:)
編集:単純化された例
編集する:/var/log/samba/log.smbd
[2012/09/23 22:42:32, 0] smbd/server.c:1053(main)
smbd version 3.6.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2012/09/23 22:42:32, 5] ../lib/util/debug.c:330(debug_dump_status)
INFO: Current debug levels:
all: 10
tdb: 10
printdrivers: 10
lanman: 10
smb: 10
rpc_parse: 10
rpc_srv: 10
rpc_cli: 10
passdb: 10
sam: 10
auth: 10
winbind: 10
vfs: 10
idmap: 10
quota: 10
acls: 10
locking: 10
msdfs: 10
dmapi: 10
registry: 10
doing parameter log file = /var/log/samba/%m.log
doing parameter max log size = 5000
doing parameter dns proxy = no
doing parameter printing = bsd
doing parameter printcap name = /dev/null
doing parameter disable spoolss = yes
doing parameter unix extensions = no
doing parameter follow symlinks = yes
doing parameter wide links = yes
[2012/09/23 22:42:32, 4] param/loadparm.c:9608(lp_load_ex)
pm_process() returned Yes
[2012/09/23 22:42:32, 7] param/loadparm.c:9834(lp_servicenumber)
lp_servicenumber: couldn't find homes
[2012/09/23 22:42:32, 10] param/loadparm_server_role.c:101(set_server_role)
set_server_role: role = ROLE_STANDALONE
[2012/09/23 22:42:32, 5] ../lib/util/charset/codepoints.c:235(map_locale)
Substituting charset 'UTF-8' for LOCALE
[2012/09/23 22:42:32, 2] lib/tallocmsg.c:124(register_msg_pool_usage)
Registered MSG_REQ_POOL_USAGE
[2012/09/23 22:42:32, 2] lib/dmallocmsg.c:78(register_dmalloc_msgs)
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
編集する:/var/log/samba/smbd.log
答え1
おそらく、これらの混乱の原因は、ディレクトリの所有権と権限によるものです。職場のプロフィールをインポートしました。 「force *」コマンドを書き留めます。
[usb]
path = /usb
force user = akond
force group = +wheel
force group = akond
create mask = 0666
force create mode = 0666
force directory security mode = 0666
directory mode = 0777 #and
force directory mode = 0777 #or
writeable = yes
メモ
私は持っていますunix extensions = no
。
修正する
[global]
interfaces = 192.168.2.113
workgroup = BUNKER
netbios name = NFS
admin users= @"Domain Admins"
server string = Samba Server %v
security = USER
encrypt passwords = Yes
obey pam restrictions = No
ldap passwd sync = Yes
unix password sync = Yes
passwd program = /usr/local/sbin/smbldap-passwd "%u"
passwd chat = *new*password* "%n"\n *new*password* "%n"\n *updated*successfully*
log level = 0
syslog = 0
log file = /var/log/samba/log.%m
max log size = 100000
time server = Yes
socket options = TCP_NODELAY
mangling method = hash2
logon script = startup.cmd
logon drive = H:
logon home =
logon path =
domain logons = Yes
os level = 200
passdb backend = ldapsam:ldap://192.168.2.113/
ldap admin dn = cn=manager,dc=tmd,dc=loc
ldap suffix = dc=tmd,dc=loc
ldap group suffix = ou=Group
ldap user suffix = ou=People
ldap machine suffix = ou=Computers
add user script = /usr/local/sbin/smbldap-useradd -m "%u"
ldap delete dn = Yes
delete user script = /usr/local/sbin/smbldap-userdel "%u"
add machine script = /usr/local/sbin/smbldap-useradd -t 0 -w "%u"
add group script = /usr/local/sbin/smbldap-groupadd -p "%g"
add user to group script = /usr/local/sbin/smbldap-groupmod -m "%u" "%g"
delete user from group script = /usr/local/sbin/smbldap-groupmod -x "%u" "%g"
set primary group script = /usr/local/sbin/smbldap-usermod -g '%g' '%u'
load printers = No
hosts allow = 192.168.2.0/24 , 127. , 192.168.1.0/24
unix charset = UTF8
dos charset = 866
preserve case = yes
short preserve case = yes
default case = lower
case sensitive = no
create mask = 0664
directory mask = 0775
force create mode = 0664
force directory mode = 0775
[homes]
comment = repertoire de %U, %u
read only = No
create mask = 0644
directory mask = 0775
browseable = No
[netlogon]
path = /storage/samba/netlogon/
browseable = No
read only = yes
[files]
path = /files
browseable = Yes
read only = No
directory mask = 0777
create mask = 0666