On Mon, 29 Oct 2012 22:13:34 +
Alumno Etsii wrote:
> 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@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.
> Server role: ROLE_STANDALONE
> Press enter to see a dump of your service definitions
>
> [global]
> 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 = 127.0.0.1, 192.168.0.
> hosts deny = 0.0.0.0/0
> printing = bsd
> print command = lpr -r -P'%p' %s
> lpq command = lpq -P'%p'
> lprm command = lprm -P'%p' %j
>
> [shared]
> 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 //192.168.0.99/shared ./mount -o
> uid=localuser,gid=localuser,iocharset=utf8,credentials=/tmp/credentials,nosetuids,noperm
>
> File /tmp/credentials contains username myuser and its password.
>
> I successfully mount that share, I can list, cd, etc. but not write:
>
> root@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 localuser11 may 21 2009 VERSION
> root@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.
Then that won't work. You're connecting to the share as "myuser". Any
files you create will be created as "myuser", not "localuser".
> 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!
>
> Regards.
Ok, so the file isn't created at all when you "touch"?
Does "myuser" have permission to write to /shared on the server?
--
Jeff Layton
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba