The UNIX Forums
"Join the Network of UNIX System Users"


 
Alvin
Newbie
Rank: 1



UID 50
Digest Posts 0
Credits 0
Posts 19
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:18 AM  Profile | P.M. 
chown issue



chown issue



i have a strange problem in my linux box (suse). recently i took over this box as admin even though i have no prior admin experience. following is my issue

i had following users under 'root' group initially

user1
user2
user3

since i did not like user ids under root group. i modifed these user's group to 'users' using

usermod

command. then i realised that all their files were still under group 'root', so using root id changed their group for all the files recursively using

chgrp -r users <home>

then after some time, users complained that they could not able to change ower of the files. but claimed they could able to chown earlier

user3 tried the following

$ chown user1 test.sh

and getting the following error


> chown user1 test.sh
chown: changing ownership of `test.sh': operation not permitted

file test.sh is owned by user3 and under users group

-rwxrwxrwx 1 user3 users 36 2007-05-16 17:50 test.sh

but it is working under root id (i know it should)

then i changed the group back to root using

> id
uid=1010(iriuser3) gid=0(root) groups=0(root)

> id
uid=1008(iriuser1) gid=0(root) groups=0(root)

even chgrp is nor working. giving the same error

please let me know how to resolve this issue


Top
DPhil
Newbie
Rank: 1



UID 122
Digest Posts 0
Credits 0
Posts 36
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:18 AM  Profile | P.M. 
depending on your operating system, either a use can run chown to give ownership of a file to another user or not. solaris, for example, does not allow chown to be run by any user except root. hp-ux will allow chown run by any user to actually change ownership of a file to another user. what os are you running?
Top
britishguy
Newbie
Rank: 1



UID 77
Digest Posts 0
Credits 0
Posts 71
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:19 AM  Profile | P.M. 
thanks. i am using suse linux
Top
littlebobek
Newbie
Rank: 1



UID 236
Digest Posts 0
Credits 0
Posts 26
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:19 AM  Profile | P.M. 


QUOTE:
depending on your operating system, either a use can run chown to give ownership of a file to another user or not. solaris, for example, does not allow chown to be run by any user except root. hp-ux will allow chown run by any user to actually change ownership of a file to another user. what os are you running?

on solaris this behavior is tunable on a global basis via the rstchown parameter. hp-ux allows a more fine level of control via the setprivgrp facility.
Top
britishguy
Newbie
Rank: 1



UID 77
Digest Posts 0
Credits 0
Posts 71
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:19 AM  Profile | P.M. 


QUOTE:
what about linux? i am using suse linux

depends on the release. linux is moving toward capabilities with chown controlled by cap_chown. see:
http://www.die.net/doc/linux/man/ma...bilities.7.html
Top
bochgoch
Newbie
Rank: 1



UID 73
Digest Posts 0
Credits 0
Posts 56
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:19 AM  Profile | P.M. 
thanks perderabo. by the way, what is the effect of creating a user id (say user1) with uid=0 (that of root)? will it cause any issues or system crash?
Top
napster_san
Newbie
Rank: 1



UID 12
Digest Posts 0
Credits 0
Posts 52
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:19 AM  Profile | P.M. 


QUOTE:
no crashes! that's for sure. it might be a security problem though.

Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:41 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.006584 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP