Jason Welsh
2017-May-22 19:57 UTC
[CentOS] question about shared samba directory file permissions..
im trying to set up a shared samba directory for users to use on centos 7, but whenever I create a file from the samba client to the samba server, the owner of the file ends up being the user the share is mounted up as.. on the server (server1), [samba] comment = samba share path = /samba/ read only = No valid users = @samba write list = @samba force group = +samba create mask = 0770 browseable = yes [root at server1 ~]# grep samba /etc/group samba:x:6666:user2,user3 [root at server1 ~]# id user2 uid=2010(user2) gid=2010(user2) groups=2010(user2),6666(samba) on the client (server2), [root at server2 ~]# grep samba /etc/group samba:x:6666:user2,user3 [user2 at server2 samba]$ pwd /mnt/samba [user2 at server2 samba]$ df -h ./ Filesystem Size Used Avail Use% Mounted on //rhce1/samba 11G 4.5G 5.8G 44% /mnt/samba [user2 at server2 samba]$ touch file [user2 at server2 samba]$ ls -al file -rw-rw----. 1 *user3* samba 0 May 22 15:52 file [user2 at server2 samba]$ id uid=2010(user2) gid=2010(user2) groups=2010(user2),6666(samba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [user2 at server2 samba]$ any ideas? regards, Jason
Gordon Messmer
2017-May-22 20:10 UTC
[CentOS] question about shared samba directory file permissions..
On 05/22/2017 12:57 PM, Jason Welsh wrote:> im trying to set up a shared samba directory for users to use on > centos 7, but whenever I create a file from the samba client to the > samba server, > the owner of the file ends up being the user the share is mounted up as..That's how SMB works. Connections are user-oriented. Everything done over a given connection is done as the user who authenticated the connection. You probably want NFS if you want to trust the client workstations to identify separate users.
m.roth at 5-cent.us
2017-May-22 21:16 UTC
[CentOS] question about shared samba directory file permissions..
Gordon Messmer wrote:> On 05/22/2017 12:57 PM, Jason Welsh wrote: >> im trying to set up a shared samba directory for users to use on >> centos 7, but whenever I create a file from the samba client to the >> samba server, >> the owner of the file ends up being the user the share is mounted up >> as.. > > > That's how SMB works. Connections are user-oriented. Everything done > over a given connection is done as the user who authenticated the > connection. > > You probably want NFS if you want to trust the client workstations to > identify separate users. >Do the users have a Linux login? If so, you can add all of them to a group, and give the group explicit access. mark
Leon Fauster
2017-May-23 10:26 UTC
[CentOS] question about shared samba directory file permissions..
> Am 22.05.2017 um 21:57 schrieb Jason Welsh <jason.welsh at mercurygate.com>: > > im trying to set up a shared samba directory for users to use on centos 7, but whenever I create a file from the samba client to the samba server, > the owner of the file ends up being the user the share is mounted up as.. > on the server (server1),this force user = nobody force group = nobody valid users = @support read only = No create mask = 0660 directory mask = 0770 works here without any problems. -- LF
jason welsh
2017-May-26 00:38 UTC
[CentOS] question about shared samba directory file permissions..
so you were able to see files created on that share with usernames other than the one that was used to mount the share? I tried this config and it didnt seem to make a difference. regards, jason On 05/23/2017 06:26 AM, Leon Fauster wrote:>> Am 22.05.2017 um 21:57 schrieb Jason Welsh <jason.welsh at mercurygate.com>: >> >> im trying to set up a shared samba directory for users to use on centos 7, but whenever I create a file from the samba client to the samba server, >> the owner of the file ends up being the user the share is mounted up as.. >> on the server (server1), > this > > force user = nobody > force group = nobody > valid users = @support > read only = No > create mask = 0660 > directory mask = 0770 > > works here without any problems. > > -- > LF > > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos