bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

root cannot use chown to change ownership of files


From: Hsien-Hen Lu
Subject: root cannot use chown to change ownership of files
Date: Tue, 26 Feb 2002 18:27:05 -0500

>I am not familiar with any "userconf" program.  If it is important to
>the issue at hand then you will need to educate me and provide more
>information.  I have never heard of it.

It is just an utility to list all users accounts and their information on
the same linux box. (If you can suggest an alternative utility doing the
same thing. I would be more than happy to show you whether the owners of the
files that chown fails.

>If you suspect that it is a bug in the utilities then this is a good
>forum.  But if you want to generation discussion on how things work
>then I suggest one of the news groups such as comp.unix.misc or
>possibly you should read the faqs in news.answers.  Also check out the
>utils specific faq here:

>  http://www.gnu.org/software/fileutils/doc/faq/

>If you cannot remove the file as root or change the ownership of the
>file as root then something sounds corrupted within your filesystem.
>The chown program is small enough that I don't think there are any
>hidden bugs there and so I really doubt it is a program bug.  But it
>might be something else.  You would need to provide more information
>before we would know.

I am not sure. I will provide the information you suggested in the same
order of
your example below. Please let me know if you need more information.

>For are more complete bug report please generate a small case where
>this behavior you are seeing is illustrated.  Send to the list the
>details of the operating system you are using and the --version output
>of the programs you are using.  Something like the following.
>
>  id
>  uid=0(root) gid=0(root)

address@hidden exp]# id
uid=0(root) gid=0(root)
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

>  ls -ld ./filename
>  -rw-rw-r--    1 bob      bob             0 Feb 26 09:15 ./filename

address@hidden blah]# ls -ldL /dev/inet/pi.old/old.d0t/d0t-d/blah/*
-rwxr-xr-x    1 1031     users      613376 Feb 19 18:00
/dev/inet/pi.old/old.d0t/d0t-d/blah/beware
-rw-r--r--    1 53591    56980         185 Feb 10 15:37
/dev/inet/pi.old/old.d0t/d0t-d/blah/rc.local
-rw-r--r--    1 53591    56980         640 Feb 19 18:01
/dev/inet/pi.old/old.d0t/d0t-d/blah/s
-rw-------    1 53591    56980         522 Jul 13  2001
/dev/inet/pi.old/old.d0t/d0t-d/blah/s_h_k
-rw-------    1 53591    56980         512 Jan 25 17:17
/dev/inet/pi.old/old.d0t/d0t-d/blah/s_r_s

(Note: None of the user id or group id are created by our system.)

>  chown root:root ./filename

address@hidden blah]# chown root:root beware
chown: beware: Operation not permitted
address@hidden blah]# chown root:root rc.local
chown: rc.local: Operation not permitted
address@hidden blah]# chown root:root s
chown: s: Operation not permitted
address@hidden blah]# chown root:root s_h_k
chown: s_h_k: Operation not permitted
address@hidden blah]# chown root:root s_r_s
chown: s_r_s: Operation not permitted

>  ls -ld ./filename
>  -rw-rw-r--    1 root     root            0 Feb 26 09:15 ./filename
address@hidden blah]# ls -ldL *
-rwxr-xr-x    1 1031     users      613376 Feb 19 18:00 beware
-rw-r--r--    1 53591    56980         185 Feb 10 15:37 rc.local
-rw-r--r--    1 53591    56980         640 Feb 19 18:01 s
-rw-------    1 53591    56980         522 Jul 13  2001 s_h_k
-rw-------    1 53591    56980         512 Jan 25 17:17 s_r_s

>  chown --version
>  chown (fileutils) 4.1

address@hidden blah]# chown --version
chown (GNU fileutils) 4.0p
Written by David MacKenzie.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

>  uname -a
>  HP-UX strife B.10.20 A 9000/785 unknown
address@hidden blah]# uname -a
Linux wawa.cpmc.columbia.edu 2.2.14-6.1.1smp #1 SMP Thu Apr 13 19:55:55 EDT
2000 i686 unknown

P.S.: By using a utility "mc" I found that all these files have a symbolic
link to
        /root/ . I wonder if this is something chown can deal with.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]