[Samba] Strange behaviour with "force user" parameter

Bruno MACADRÉ bruno.macadre at univ-rouen.fr
Wed Aug 13 01:33:28 MDT 2014


Hi,

I confirm that there is a bug with the force user parameter, I've tried 
with a windows 7 workstation joined to the domain.

I have this simple homes share :
[homes]
     comment = Home dir for %S
     force user = %S
     force group = %G
     create mask = 0600
     directory mask = 0700
     read only = No

The home dir of user 'foo' is /home/foo. The rights for this path are :

drwxr-xr-x 6 root root 81 août  12 17:33 /home/

drwx------ 3 foo domain users 25 août  13 09:22 /home/foo/


When I connect my user on the Win7 workstation and want to go to his 
home dir (mapped in Z:) I get a "permission denied" error message.

If I do the same with "force user" commented all work like a charm.

Am I the only one to have this bug ? Can I open a bug report about it or 
anybody knows a mysterious undocumented mechanism that lead to this 
behaviour ?

Thanks,
Regards,
Bruno



Le 12/08/2014 14:58, Bruno MACADRÉ a écrit :
> Hi,
>
> I'm in trouble with a share, I found that the problem comes from the 
> "force user" parameter in my smb.conf.
>
> This is my smb.conf :
[cut for readability]
> On my workstation, logged with root user, I do : "mount -t cifs -o 
> user=administrator //filserv/Admins foo" the mount works.
>
> I do an 'ls -l foo' :
> total 4
> drwxr-x--- 5 10500 50512    0 août  12 14:32 .
> drwx------ 5 root  root  4096 août   4 09:18 ..
> drwxr-x--- 4 10500 50512    0 août  12 14:33 Linux
> drwxr-x--- 6 10500 50512    0 août   7 17:27 Windows
>
> Where 10500 is the UID of user administrator and 50512 is the GID of 
> group "Domain Admins".
>
> I enter into 'foo' and do 'touch bar' I get a "Permission Denied"....
>
> If I comment the "force group" parameter (and restart smbd) :
>
> 'touch bar' => works
> 'ls -al':
> total 4
> drwxr-x--- 5 10500 50512    0 août  12 14:45 ./
> drwx------ 5 root  root  4096 août   4 09:18 ../
> -rw-r----- 1 10500 50512    0 août  12 14:45 bar
> drwxr-x--- 4 10500 50512    0 août  12 14:33 Linux/
> drwxr-x--- 6 10500 50512    0 août   7 17:27 Windows/
>
> The file bar is here with good permissions, owner and groups.... and 
> is editable
>
> If I uncomment again the 'force user' parameter (and restart samba), 
> if I want to remove file, I get a "Permission Denied"
>
> I don't understand.... In my memories this parameter worked in 4.1.9....
>
> Regards,
> Bruno
>
>

-- 

Bruno MACADRE
-------------------------------------------------------------------
  Ingénieur Systèmes et Réseau     | Systems and Network Engineer
  Département Informatique         | Department of computer science
  Responsable Info SER             | SER IT Manager
  Université de Rouen              | University of Rouen
-------------------------------------------------------------------
Coordonnées / Contact :
	Université de Rouen
	Faculté des Sciences et Techniques - Madrillet
	Avenue de l'Université
	CS 70012
	76801 St Etienne du Rouvray CEDEX
	FRANCE

	Tél : +33 (0)2-32-95-51-86
	Mob : +33 (0)6-74-71-45-64
-------------------------------------------------------------------



More information about the samba mailing list