Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to chown a file, and I am getting a Not ownermessage

bash-3.00$ uname -a
SunOS host001 5.10 Generic_138888-03 sun4u sparc SUNW,SPARC-Enterprise
bash-3.00$ id
uid=60010(user1) gid=910(web)
bash-3.00$ ls -l file.ext
-rwxrwxrwx   1 user1  web        17449 Feb 14 10:53 file.ext
bash-3.00$ chown user2 file.ext
chown: file.ext: Not owner

How could I detect if this machine has restricted chown usage?

share|improve this question
up vote 2 down vote accepted

getconf _POSIX_CHOWN_RESTRICTED / checks the setting on the / directory, POSIX allows different paths to have different values, such as local filesystems vs. NFS, hence the requirement to include a path to the directory or file you want to know about.

share|improve this answer
That's what I was looking for. Thank you. – fglez Feb 16 '11 at 18:19

As root:

echo "rstchown/D" | adb -k /dev/ksyms

If this returns "rstchown: 1", then you cannot chown unless root. You can add:

set rstchown = 0

to /etc/system to change this behavior.

share|improve this answer
Isn't there any way to check without root permission? – fglez Feb 14 '11 at 10:53
It's probably set to 1 because that is the default and you can't seem to chown files as a regular user. – Cakemox Feb 14 '11 at 11:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.