SGID on a directory forces group but how do you force owner
Keith Morse
kgmorse
Mon May 17 11:58:13 PDT 2004
On Wed, 14 Jan 2004, Jason Joines wrote:
> I have a bunch of user on a web server with web pages in the
> public_html subdirectory of their home directories. In addition to
> being able to create, delete and edit their own pages, they usually need
> assistance from some of our web guys so they need to be able to do the
> same thing.
> I set the umask so that group and owner both have rwX, and set the
> group on all the public_html directories to webguys. Then I SGIDd
> (chmod g+s) the public_html direcotries.
> The result was that if a user put some file into their public_html
> directory, the webguys could edit or delete it. In addition, the
> webguys could put pages up for the user.
> That's where the problem started. If a webguy puts a page up, he owns
> it. Then the user can't edit or delete it and it doesn't count against
> the user's quota.
> Is there any way to force the owner, like forcing the group via SGID on
> the directory? I tried SUID on the directory but that doesn't work.
> Any other ideas?
>
The only method I'm aware that would do the "force" as construe it is
something like nfs. The other alternative would be to have the developers
use ssh, copy the files via scp for example. Then put out each of the
developers public ssh key to each of the users .ssh/authorized_keys file
and have them log or perform the copy as that particular user.
More information about the Linux-users
mailing list