You are not logged in.

#1 2020-10-16 10:28:54

Registered: 2015-04-26
Posts: 15

Samba Guest Permissions - Can Not Delete Files


I am unable to delete files mounted between two Arch Linux machines (upgraded both just now) as a guest user. Everything else works (create file, edit file, move file to other location on share, rename file, delete folder). But I am unable to delete files. When trying to move a file to e. g. /tmp, it gets duplicated but not removed on the source. There is no error when trying to delete a file, it just stays there like nothing happend..

This setup used to work including deletion as a guest user. I am unsure when exactly it broke..

When using the share with a user, everything works as expected.

This is the relevant snipped of my smb.conf

        map to guest = Bad User
        idmap config * : backend = tdb
        mangled names = no

        create mask = 0644
        force user = mediauser
        guest ok = Yes
        path = /zfspool/media
        read only = No

I already played around with some settings and also moved the share off the zfs pool to my btrfs root, but no success, the behavior is the same.

Thanks for any ideas :-)


this is how I mount the share for testing:

mount -t cifs -o rw,guest //<server>/media /media


okay when settings 777 permissions on the media folder on the server, deleting works. But I never had these permissions set at the time it worked with guest. Weird.. In my logic, the guest user should have all permissions of "mediauser" because of the force user setting, therefore also be able to delete files. Instead, the guest user seems to map to another user, therefore the o-rwx settings enables deletion... Hm..

Last edited by cryptoluks (2020-10-16 10:51:53)


#2 2020-10-29 05:01:23

From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 487

Re: Samba Guest Permissions - Can Not Delete Files

Have you learned more about this issue? It seems to have popped up for me with the latest Samba package release, but I don't see anything obvious in the 4.13 release notes that would lead me to expect this behavior.


#3 2020-11-15 12:52:49

Registered: 2005-12-13
Posts: 84

Re: Samba Guest Permissions - Can Not Delete Files

Any update?

I seem to be hit by the same issue - it used to work a few weeks ago.

The problems seems to be with "force user = scanner" and "force group = scanner" in sbm.conf, which I use so that all created files are owned by a single user.

The samba clients (they log in using their own username&password) can create and modify files, but cannot delete them.
I do not have any sticky bit on the SMB share directory on the server.
The "scanner" user on the server can delete the files.

P.S.2 Deleting files works when I set "force user" to the same username which is used by the samba client to log in (and when I modify the ownership of the shared directory to that very same user).

P.S.2 As a workaround, I set world writable bit to the shared directory ("chmod o+w /path/to/share/Scanner") and continue to use "force user = scanner".

Milan Knizek


Board footer

Powered by FluxBB