[nzlug] Samba file creation ownerships.
Andrew Bruce
abruce at hope-st.ath.cx
Sat Jan 20 00:55:33 NZDT 2007
Hi,
I'm trying to setup something (tricky I think - unless I'm going about
this the wrong way...)
I've got a folder called storage on my server which a flatmate and I use
to keep a bunch of files that we want to be accessible to both of us,
and the general flat. I've created the folder [storage], and assigned
it nobody:store ownership (I created the UNIX group store), and
rwxrwxr-x permissions.
I've shared this folder through Samba (as it needs to be Linux and
Windows accessible, as we both dual boot, and one other flatmate is
Windows only) and allowed guest access to the folder, so that the other
flatty can browse but not write files and this works. The Samba setup
also allows us two users to be able to create files and directories,
which are created with the correct permissions (774) and this works well.
The issue is that when user1 (or user2) creates the files, the machine
gives the group ownership of the files to the group users (as in
user1:users). This becomes an issue, because I have other users who
have Samba accounts on the machine and are users group members who can
then play with files, or write files into directories created.
What I need to be able to do is to set the group ownership of any
directory or file created by user1 and user2 to the store group.
I tried the force group = store option, but this also happens to force
the guest user to 'appear' as part of the store group, allowing them to
do whatever they want.
Any suggestions, or alternative ways to set this up? I would prefer not
to have to use the 'admin users' option in the smb.conf file, as I would
rather just be able to add the user to a UNIX group when they are
created and they instantly have the right permissions.
Thanks,
Andrew Bruce
More information about the NZLUG
mailing list