1748121 Members
3231 Online
108758 Solutions
New Discussion юеВ

Chown Issues - Stumped

 
SOLVED
Go to solution
Peter_17
Frequent Advisor

Chown Issues - Stumped

All,

I'm in a NIS/NFS environment where I can log into either HP's or Suns. In the HP environment, chown works, but in the Sun environment, it doesn't. Please see details below:

[myname@SUNmachine1]% ls -l
-rwxr-xr-x 1 myname sysadmin 1586 Jun 22 16:11 file3
-rwxr-xr-x 1 myname sysadmin 9 Jul 9 09:48 test.sh
[myname@SUNmachine1]% id
uid=12345(myname) gid=14(sysadmin)
[myname@SUNmachine1]% chown yourname test.sh
chown: test.sh: Not owner
[myname@SUNmachine1]%
[myname@SUNmachine1]% telnet HPmachine1

[myname@HPmachine1]% ls -l
-rwxr-xr-x 1 myname sysadmin 1586 Jun 22 16:11 file3
-rwxr-xr-x 1 myname sysadmin 9 Jul 9 09:48 test.sh
[myname@HPmachine]% chown yourname test.sh
[myname@HPmachine]% ls -l
-rwxr-xr-x 1 myname sysadmin 1586 Jun 22 16:11 file3
-rwxr-xr-x 1 yourname sysadmin 9 Jul 9 09:48 test.sh
[myname@HPmachine]%


Anyone have any suggestions as to why this is?

Any and all help appreciated!!

Pete
7 REPLIES 7
Joseph C. Denman
Honored Contributor

Re: Chown Issues - Stumped

hummmmmm???

For some reason, the system does not think you are myname?

Try to touch a file in that dir.

touch test1.sh

Is the owner myname or is it another?

...jcd...
If I had only read the instructions first??
Peter_17
Frequent Advisor

Re: Chown Issues - Stumped

Yes, not a problem... I can create it, but after that, I cannot chown OR chrgp it...
Patrick Wallek
Honored Contributor

Re: Chown Issues - Stumped

Has someone somehow changed permissions on chown on the Sun boxes? On you sun box do an 'll `which chown`' and see what the permissions look like. I'm not logged into the office so I can't check on one of our sun boxes.
Suhas_2
Regular Advisor

Re: Chown Issues - Stumped

Hi,
This is a security feature provided by SUN ... the obvious reason is that "no unpriviledged user should be able to give or take ownership".
Hope this clarifies the query.

Suhas.
Never say "Die"
Frank Li
Trusted Contributor
Solution

Re: Chown Issues - Stumped

yes,suhas is right!

on Sun(solaris) , when you "man chown" , it prompts this to you !

-=
The operating system has a configuration option
{_POSIX_CHOWN_RESTRICTED}, to restrict ownership changes.
When this option is in effect the owner of the file is
prevented from changing the owner ID of the file. Only the
super-user can arbitrarily change owner IDs whether or not
this option is in effect. To set this configuration option,
include the following line in /etc/system:

set rstchown = 1

To disable this option, include the following line in
/etc/system:

set rstchown = 0

{_POSIX_CHOWN_RESTRICTED} is enabled by default. See sys-
tem(4) and fpathconf(2).
-=-=

Hi Friend
Mark van Hassel
Respected Contributor

Re: Chown Issues - Stumped

Hi,

Just for info: on HP-UX you can restrict the chown command with "setprivgrp", see man 1m setprivgrp.
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Peter_17
Frequent Advisor

Re: Chown Issues - Stumped

Thanks to all who responded. I knew I could rely on you guys!

I learn something everyday!

Pete