I configured a basic samba shire to share media files over SMB on my local network without credentials (i.e., as a SMB guest)
/etc/samba/smb.conf
[media]
Comment = Media directory
Path = /mnt/media
Browseable = yes
Writeable = Yes
create mask = 0666
directory mask = 0777
Public = yes
When I create a directory called example
using SMB on Windows, the directory structure looks like this
ls -alh
total 28K
drwxrwxrwt 4 root root 4.0K Oct 21 13:44 ./
drwxr-xr-x 3 root root 4.0K Oct 20 13:33 ../
drwxrwxrwx 2 nobody nogroup 4.0K Oct 21 13:44 example/
drwx------ 2 root root 16K Oct 20 13:36 lost+found/
lsattr
--------------e----- ./example
When I try to delete the directory from the system using a standard user account, I get an error message.
rmdir: failed to remove 'example': Operation not permitted
Yet, I can delete the folder from using SMB on Windows. What is happening here, and how can I allow any local unix user to delete or modify files created by a guest over SMB?