non-root chowning?

STYMA, ROBERT E (ROBERT) stymar at lucent.com
Wed Jun 15 21:21:20 UTC 2005


.
.
.
> copying it. For
> example, to take ownership of "file" (owned by user a), user b can:
> 
> cp file file2
> rm file
> mv file2 file
> 
> 
This technique can be applied to a bunch of files using tar.

tar cf /tmp/temp.tar  directory1
mv directory1 directory1_old
tar xf /tmp/temp.tar

The current user now owns all the files in directory1.
This assumes that the current user has read access to 
all of directory1 and write permission to the directory
containing directory1.

If not, you may have to log on as different users to
build one or more tar files.  This is a handy technique
when shifting ownership of project files from someone who
has left the company when you do not have root access on
the machine containing the files.




More information about the fedora-list mailing list