0

We are sharing folders with samba on an Ubuntu 18 server. All the clients are also Ubuntu 18. The folder is configured this way.

[Tecnica] comment = Carpeta de manuals i informació tècnica browseable = yes path = /home/serverone/DADES/Tecnica writeable = yes public = no valid users = tecnic albert create mask = 0770 directory mask = 0770 # admin users = albert invalid users = contabilitat administratiu write list = tecnic albert # force group = forafoc`

The folder in the Fstab is mounted with this line.

//192.168.1.10/Tecnica /home/tecnic/Tecnica cifs credentials=/root/.smbcredentials,uid=1001,gid=1001,rw,dir_mode=0770,file_mode=0770,_netdev 0 0

The problem is that when a client creates a folder or file inside the folder Tecnica the group permissions are not applied.

If the file fstab sets the group permission rwx and the samba is set to allow writing...Could it be anything on the kernel that does not allow Samba to set this permissions?

Kind Regard, Biel

0

The group permissions are not applied from the server perspective when it looks at /home/serverone/DADES/Tecnica or from the client when it looks at /home/tecnoc/Tecnica?

If it's from the client side does it work correctly if you add the "nounix" option:

//192.168.1.10/Tecnica /home/tecnic/Tecnica cifs credentials=/root/.smbcredentials,uid=1001,gid=1001,rw,dir_mode=0770,file_mode=0770,_netdev,nounix 0 0

EDIT: If the problem is multiple clients accessing this share and not multiple users on the same client one option is this:

You allow only two users access to this share tecnic and albert and albert appears to be the administrator so add another line to the share definition of [Tecnica]:

force user = albert

[Tecnica]
 comment = Carpeta de manuals i informació tècnica
 browseable = yes
 path = /home/serverone/DADES/Tecnica
 writeable = yes
 public = no
 valid users = tecnic albert
 force user = albert

Then when tecnic is allowed access he will act as albert. Any new file tecnic adds will be owned by albert so now both users will be able to write to each others files. All the old files will have to have their ownership change to albert.

The alternative to this is slightly more complicated and will only work if you are using Ubuntu Server. See my post here: Best practice for shared directory on server (samba windows 10 clients)

| improve this answer | |
  • Hello @Morbius 1, thanks for your answer, but it doesn't work. The result is exactly the same than before the change. When I create a subfolder in the folder Tecnica in my computer and type in the console the command ls -l the rights of the folder appear drwxrwx---. But when I go to another computer with an user of the same group than mine, the folder is readonly. – Biel Trobat Obrador Sep 10 '18 at 14:48
  • I've edited my original answer based on the new information. – Morbius1 Sep 10 '18 at 20:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.