• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

How do I determine if CHOWN is restricted on my system

Whenever I try to chown a file, I get "Not Owner"

Running on Solaris 8
0
paynestreet
Asked:
paynestreet
  • 3
  • 2
  • 2
  • +1
1 Solution
 
brettmjohnsonCommented:
If you are not root, you can only change ownership of files you own.
[root (or superuser) can change ownership of files owned by others.]
If you are a sudoer, you can use sudo to run chown.

sudo chown me someone_elses_file ...

0
 
paynestreetAuthor Commented:
I can't even do it on my own files
0
 
TintinCommented:
brettmjohnson probably made a typo above.

I suspect he meant "you can only change *permission* of files you own"

Short answer is you need root privs to change ownership.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
brettmjohnsonCommented:
I made no typo.  You can only change owner of file you own [unless you are root].
Otherwise you could change ownership of someone else's file to yourself, then change permissions on the file you stole.


0
 
TintinCommented:
What circumstances/system can a non-root user change ownership on a file owned by themselves to someone else?

I certainly can't think of any circumstance where that can occur.
0
 
ahoffmannCommented:
> I can't even do it on my own files
only root can (in Solaris 6 and later)
0
 
TintinCommented:
ahoffman.

Are you implying that Solaris 2.5.1 and lower allows non-root users to change ownership of their files?  Certainly news to me.

0
 
ahoffmannCommented:
Tintin, not sure when the change was, but in eraly versions (as well as in SunOS) chown by the owner was possible, at least if it was a local filesystem.
IMHO, this was a nice feature 'cause you could give away a file.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now