Quote:
Originally Posted by vfclists
I have created some websites in the /home directories for different
users, and I have added the webmaster account to each user's group, to
allow him to create files there. I have used the sticky bit to ensure
that the files are created with the user's group.
|
Just for the record, if you mean this bit: rw-rw
s--- then it is called the SETGID bit, not the sticky bit.
Quote:
Originally Posted by vfclists
The files created are always owned by the webmaster.
How can I ensure that the files also inherit the owner/user as well?
|
AFAIK you cannot. Files are always created by a user as that user. You can change the group tough by assigning a different primary group to a user of use the SETGID bit as you did. The group thingy assures that all users in a group (even if the user is unique in his own group) can read/write the files.
Quote:
Originally Posted by vfclists
I have also created a samba share that has links in the webmaster's
directory pointing into the user's directories, but I want to ensure
that the files created are owned by the directory user. If I can get
the above issue to work, will samba conform automatically?
/vfclists
|
Samba doesn't know about SETGID bits. As soon as a file is created the Linux file system ensures the correct use of the SETGID. So you will achieve your goal but not because Samba actively supports it. BTW I have noticed that you have to make files rwxrw
x--- in order to
modify them in Windows. Despite of the rw- bits set you can read and write but not modify.
You can set both the execute bit and SETGID bit. rws means x+S, rwS means S only.
jlinkels