Welcome to U&L! You probably don't need files to become nobody:nogroup 0777. I am very sorry but the pattern you would want was broken by Gnome/systemd (and udisks). At least, if Alice uses these on the same computer that runs the Samba server.
This is discussed (not very clearly) in the questions Shared, read-write, photo directory tree, for normal users and Share folder/files between multiple users on ext4 disk
If Alice isn't using Gnome (including the Gnome file manager), nor udisks (to allow users to mount removable filesystems ) on the same computer that runs the Samba server, then you might actually be able to use the original User Private Groups pattern.
IIRC, Redhat systems already set the correct umask for UPG. For Debian-based systems, you might need to enable and configure pam_umask. See https://stackoverflow.com/questions/10220531/how-to-set-system-wide-umask
EDIT: if you have to change the umask
, you will also have to change the access mode of any existing files, that you might want to share in future. E.g. chmod -R g+w $HOME/*
or chmod -R g+w /home/*/*
. Do not use chmod -R g+w $HOME
. It will change the mode of $HOME/.ssh
, and likely stop you logging in using ssh
.
Otherwise, maybe someone can suggest a workaround based on this information.
I can suggest one alternative, based on the thread Setting up permissions for common folder
It sounds like you want the guest users to be able to delete and edit these files... this suggests they might not be very big files.
From the information you give, it seems Alice could act as a guest herself, using the Samba share to upload the files. ...you just have to avoid telling Alice where the Samba directory is on the server. And if she's smart enough to find it, she's smart enough to be told that computers were a mistake and her perfectly logical idea will not work because Reasons.
(If you absolutely needed to, you could "hide" the Samba server by running it inside a container such as LXC.)
In case Alice has an account on the Samba server which is not a guest, it might also be necessary to use chmod g+s
on the directory, and in smb.conf
set
create mask = 0775
directory mask = 0775
inotify
to detect newly created files, and changes the permissions immediately, I think it would work quite nicely for my case.