[Samba] Scenario with CIFS

Alumno Etsii todos.somos.yo at gmail.com
Mon Oct 29 16:13:34 MDT 2012

Hi all!

I'm trying to get samba working with CIFS, mounting a share on a client and
keeping the original file/dir permissions. The problem is that after I
(successfully) mount that share by CIFS, I can't write anything in it,
because I get a 'Permission denied' error. smbd version is 6.3.6.

My testparm is:

root at samba:~# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[shared]"
Loaded services file OK.
Press enter to see a dump of your service definitions

        workgroup = SMB
        server string = %h server (Samba, Ubuntu)
        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
        load printers = No
        printcap name = /dev/null
        disable spoolss = Yes
        show add printer wizard = No
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb
        hosts allow =, 192.168.0.
        hosts deny =
        printing = bsd
        print command = lpr -r -P'%p' %s
        lpq command = lpq -P'%p'
        lprm command = lprm -P'%p' %j

        comment = Shared documents
        path = /shared
        valid users = myuser
        admin users = admin
        read only = No
        create mask = 0700
        force create mode = 0700
        directory mask = 0700
        browseable = No


Mounting command is:
# mount -t cifs // ./mount -o

File /tmp/credentials contains username myuser and its password.

I successfully mount that share, I can list, cd, etc. but not write:

root at monitor:/mnt/mount/archiveupload# ll
total 40
drwxrwxr-x 4 localuser localuser     0 oct 29 21:25 ./
drwxr-xr-x 3 localuser localuser     0 oct 29 17:30 ../
-rw-rw-r-- 1 localuser localuser  9129 oct 29 19:41 action.php
drwxrwxr-x 2 localuser localuser     0 may 21  2009 conf/
-rw-rw-r-- 1 localuser localuser 17992 may 21  2009 COPYING
drwxrwxr-x 4 localuser localuser     0 may 21  2009 lang/
-rw-rw-r-- 1 localuser localuser   241 may 21  2009 README
-rw-rw-r-- 1 localuser localuser    11 may 21  2009 VERSION
root at monitor:/mnt/mount/archiveupload# touch a
touch: no se puede efectuar `touch' sobre «a»: Permiso denegado

'localuser' exists in both server and client. My goal is to make that any
newly created file gets server's 'localuser' permissions. I added a
'smbpasswd -a' for myuser. I wonder why can't I write on this share from
the client, since I think permissions and mount options are ok.

I'll be very grateful for any idea!


More information about the samba mailing list