can't change ownership on files

Waldher, Travis R Travis.R.Waldher at boeing.com
Fri Apr 22 22:23:02 UTC 2005



> -----Original Message-----
> From: Rick Stevens [mailto:rstevens at vitalstream.com]
> Sent: Friday, April 22, 2005 1:24 PM
> To: Getting started with Red Hat Linux
> Subject: Re: can't change ownership on files
> 
> Waldher, Travis R wrote:
> > [user at host /tmp]$ chown user2 test
> > chown: changing ownership of `test': Operation not permitted
> > [user at host /tmp]$
> >
> > That about sums it up.  I need non-root users to be able to change
> > ownership on files.
> 
> You defeat the purpose of permissions if you allow anyone to change
> ownership of a file.  That's normally reserved for root or the
original
> owner of the file, and it's inherent in the "w" part of the
permissions.

Ok, I wasn't clear.

I as the owner owner can't change the ownership of my own files:

[user at host /]$ whoami
user
[user at host /]$ cd /tmp
[user at host /tmp]$ touch test
[user at host /tmp]$ ls -al test
-rw-rw-r--    1 user  unixadm         0 Apr 22 15:20 test
[user at host /tmp]$ chown user2 test
chown: changing ownership of `test': Operation not permitted
[user at host /tmp]$ ls -al test
-rw-rw-r--    1 user  unixadm         0 Apr 22 15:20 test
[user at host /tmp]$

I should be able to change the ownership of my own files without being
root.  Correct?

No.. I don't want to give just anyone the ability to change ownership of
any file.  That would be bad.  I agree.




More information about the Redhat-install-list mailing list