non-root chowning?

Jonathan Rawle jr36 at leicester.ac.uk
Wed Jun 15 20:41:09 UTC 2005


Andy Pieters wrote:

> Hi all
> 
> I have been trying to find out how to chown files while not using a root
> account.
> 
> I want to change ownership of a file from user a to user b.
> I tried adding user a to user b's group, and user b to user a's group.
> 

It's probably not what you're looking for in this instance.

But in general, if both users have write access to the file and the
directory, the second user can take ownership of a file by copying it. For
example, to take ownership of "file" (owned by user a), user b can:

cp file file2
rm file
mv file2 file






More information about the fedora-list mailing list