0

Samba is configured to use user 'torrent' and group 'users' for guest access. I am not able to alter directory and its contents without them having g+w permissions.

I'd like to have this directory writable without g+w permissions.

What am i missing ?

My smb.conf:

[global]
security = user

map to guest = bad user
guest account = torrent

[WDC_1T]
        comment = -- WDC 1TB --
        path = /mnt/WDC_1T
        read only = no
        writeable = yes

        guest only = yes
        guest ok = yes
        force user = torrent
        force group = users
        guest account = torrent

        create mask = 0644
        force create mode = 0644
        directory mask = 0755
        force directory mode = 0755

created a directory via samba, everything works as supposed:

ls -ld _TEST_OK_/
drwxrwxr-x 2 torrent users 4096 02-27 15:42 _TEST_OK_/

created a directory on linux, same permissions, except not writable by group -> no write access:

ls -ld _TEST_PERMISSION_ERROR_/
drwxr-xr-x 2 torrent users 4096 02-27 15:40 _TEST_PERMISSION_ERROR_/

ls -lR _TEST_PERMISSION_ERROR_/
-rw-rw-r-- 1 torrent users 0 02-27 15:40 plik1.txt
4
  • Your question isn't clear. Are you expecting the directory created in Linux to have group write permissions?
    – Tim Styles
    Feb 27, 2020 at 16:00
  • No. I'd like to have this directory writable without g+w permissions.
    – vooyeQ
    Feb 27, 2020 at 16:05
  • If you don't grant write permission you can't write to it. Do you mean you want only the owner (user) to be able to write to it?
    – roaima
    Feb 27, 2020 at 16:30
  • Simply speaking yes, i want user "torrent" to be able to write to it.
    – vooyeQ
    Feb 27, 2020 at 17:01

1 Answer 1

0

I ran into this same issue when using "force user = nobody" and "force group = nobody" on Fedora (UID 65534).

Ended up creating another user "netshare" (UID 65533) and using that as the Samba guest account and also "force user = netshare" and "force group = netshare".

Then creating files in a directory work without the group +w bit set. It's very strange but it works! Must be something with how Samba deals with certain accounts.

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.