2

I have two servers with Debian 5.0.

server1: samba 2:3.2.5-4lenny9 smbfs 2:3.2.5-4lenny9

smb.conf:

[test]
   comment = test
   path = /var/www/_test/
   browseable = no
   only guest = yes
   writable = yes
   printable = no
   create mask = 0644
   directory mask = 0755

server1:~# mount | grep sda3
/dev/sda3 on /var/www type ext3 (rw,acl,user_xattr)

# getfacl /var/www/_test/
# file: var/www/_test/
# owner: www-data
# group: www-data
user::rwx
group::rwx
other::r-x
default:user::rwx
default:user:www-data:rw-
default:user:testuser:rw-
default:group::rwx
default:mask::rwx
default:other::r-x

server2:

samba-common 2:3.2.5-4lenny9 smbfs 2:3.2.5-4lenny9

server2:~# mount.cifs  //server1/test /media/smb/test -o rw,user_xattr,acl
server2:~# mount | grep test
//server1/test on /media/smb/test type cifs (rw,mand)
server2:~# getfacl /media/smb/test/
# file: media/smb/test/
# owner: www-data
# group: www-data
user::rwx
group::rwx
other::r-x
default:user::rwx
default:user:www-data:rw-
default:user:testuser:rw-
default:group::rwx
default:mask::rwx
default:other::r-x

And there is the problem:

server2:~# su - testuser
(reverse-i-search)`touch': touch 123
testuser@server2:~$ touch /media/smb/
testuser@server2:~$ touch /media/smb/test/123
touch: cannot touch `/media/smb/test/123': Permission denied

Whats wrong?!

3

You need execute permissions on the folder as well. Touch does one of two things:

  1. If the file specified exists, updates the timestamp
  2. If the file specified does not exist, create a new file

To know if /media/smb/test/123 exists, touch needs to list directory contents of the smb folder, which requires execute permission.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy