You have them set to read only
read only = yes
Mat Enders from my BlackBerry®
-Original Message-
From: Sebastian Suchanek sa...@suchanek.de
Sender: samba-boun...@lists.samba.org
Date: Sat, 23 Jun 2012 23:38:22
To: samba@lists.samba.org
Subject: [Samba] Home-Shares are not writeable
Hello everyone!
After running Samba on several machines for some years, I just came
accross a rather strange problem. The short story is that the special
user home shares are readable, but not writeable.
Here's the long story: The system is a freshly set-up Debian Squeeze,
right out of the box. This is the Samba config:
8
[global]
workgroup = HST
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
log level = 4
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
8
(Aside from the added log level line and the removed printer shares,
this is exactly the config file as delivered by Debian.)
I've added a linux user testuser including a home directory and set a
Samba password by using smbpasswd -a testuser.
8
tux:/home# ls -la
...
drwxr-xr-x 2 testuser testuser 4096 23. Jun 14:01 testuser
8
And this is what happens when I try to connect to the share and do a
write operation, for instance creating a directoy:
8
tux:/home# smbclient -U testuser localhost\\testuser
Enter testuser's password:
Domain=[HST] OS=[Unix] Server=[Samba 3.5.6]
smb: \ mkdir test
NT_STATUS_MEDIA_WRITE_PROTECTED making remote directory \test
smb: \
8
As you can see from the directory listing above, the directory of course
is not write protected. (BTW: chmod-ing testuser's home directory to 777
didn't change anything.)
Here's an excerpt from /var/log/samba/log.tux. I've removed several
lines that seemed irrelevant to me in order to keep this mail short. Of
course I can supply the skipped lines if needed.
8
[2012/06/23 14:07:02.437822, 3] auth/auth.c:216(check_ntlm_password)
check_ntlm_password: Checking password for unmapped user
[HST]\[testuser]@[TUX] with the new password interface
[2012/06/23 14:07:02.437836, 3] auth/auth.c:219(check_ntlm_password)
check_ntlm_password: mapped user is: [TUX]\[testuser]@[TUX]
[2012/06/23 14:07:02.437849, 3] smbd/sec_ctx.c:210(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2012/06/23 14:07:02.437858, 3] smbd/uid.c:429(push_conn_ctx)
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2012/06/23 14:07:02.437865, 3] smbd/sec_ctx.c:310(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2012/06/23 14:07:02.437895, 4] lib/substitute.c:504(automount_server)
Home server: tux
[2012/06/23 14:07:02.437907, 4] lib/substitute.c:504(automount_server)
Home server: tux
...
[2012/06/23 14:07:02.438168, 4] lib/substitute.c:504(automount_server)
Home server: tux
[2012/06/23 14:07:02.438178, 4] lib/substitute.c:504(automount_server)
Home server: tux
...
[2012/06/23 14:07:02.438345, 4]
../libcli/auth/ntlm_check.c:399(ntlm_password_check)
ntlm_password_check: Checking NT MD4 password
[2012/06/23 14:07:02.438388, 4] auth/auth_sam.c:180(sam_account_ok)
sam_account_ok: Checking SMB password for user testuser
...
[2012/06/23 14:07:02.438505, 3] auth/auth.c:265(check_ntlm_password)
check_ntlm_password: sam authentication for user [testuser] succeeded
[2012/06/23 14:07:02.438513, 3] smbd/sec_ctx.c:210(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2012/06/23 14:07:02.438520, 3] smbd/uid.c:429(push_conn_ctx)
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2012/06/23 14:07:02.438527, 3] smbd/sec_ctx.c:310(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2012/06/23 14:07:02.438537, 4] auth/pampass.c:472(smb_pam_start)
smb_pam_start: PAM: Init user: testuser
[2012/06/23 14:07:02.439100, 4] auth/pampass.c:489(smb_pam_start)
smb_pam_start: PAM: setting rhost to: :::127.0.0.1
[2012/06/23 14:07:02.439113, 4] auth/pampass.c:498(smb_pam_start)
smb_pam_start: PAM: setting tty
[2012/06/23