[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sudo and Chown?



Paul Socolow <paul@appliedsemantics.com> writes:

> I would like to give a user the ability to chown files in certain
> directories to other users ownership.
> 
> I have configured sudo to limit the users and files that can be specified
> for this operation, but there is still one loophole that bugs me:
> 
> If the user were to make a hard link to a file I don't want them to touch in
> one of the directories they can run chown in, they could then sudo and
> change the ownership of the file I was trying to protect. 

Assuming the file resides on an ext2 fs, consider chattr +i, even root
can't create a hardlink nor modify the file without removing the
immutable attribute.

> Is there any way to keep chown from modifying files that are linked? Or can
> you prevent the creation of hard links in a directory?

s.a.

  Siggy

-- 
Siggy Brentrup - bsb@winnegan.de - http://www.winnegan.de/
****** ceterum censeo javascriptum esse restrictam *******



Reply to: