I thought the root can do anything: Here, you will see that it cannot on my machine :SuSE-8.2 with the following rpms. coreutils-4.5.8-11 glibc-2.3.2-5 glibc-locale-2.3.2-6 glibc-devel-2.3.2-6 glibc-info-2.3.2-6 reiserfs-3.6.4-12 The kernel really does not matter. It happens under both 2.4.23-pre4-pac1 suse-2.4.19-4GB The symptom is rodolfo:tmp $ ls -l slide-demo.obj -rw------- 1 ghsong ipl 3096 Aug 29 20:37 slide-demo.obj rodolfo:tmp $ ln slide-demo.obj new.obj /bin/ln: creating hard link `new.obj' to `slide-demo.obj': Operation not permitted rodolfo:tmp $ chown root.root slide-demo.obj rodolfo:tmp $ ls -l slide-demo.obj -rw------- 1 root root 3096 Aug 29 20:37 slide-demo.obj rodolfo:tmp $ ln slide-demo.obj new.obj rodolfo:tmp $ rodolfo:tmp $ ls -l slide-demo.obj new.obj -rw------- 2 root root 3096 Aug 29 20:37 new.obj -rw------- 2 root root 3096 Aug 29 20:37 slide-demo.obj rodolfo:tmp $ On any other SuSE-installed LInux machines with the same rpms installed, the "root" is "root", the hard link succeeded without a hitch even when the file's owner is not "root". I understand the latter behavior is the correct one. The security setting within yast2 on all machines are the same. What is going on? The only difference I can think of is that the "rodolfo" system is on a laptop on which Reiserfs file system was probably created around Aug 2002. while all others are on desktop, on which Reiserfs file system was created around around January 2003. reiserfsck on the file system with the readonly on gave me no error. Regards, Hugh Song
On Tuesday 23 September 2003 16:22, Hugh Song wrote:
I thought the root can do anything: Here, you will see that it cannot on my machine :SuSE-8.2 with the following rpms.
The symptom is rodolfo:tmp $ ls -l slide-demo.obj -rw------- 1 ghsong ipl 3096 Aug 29 20:37 slide-demo.obj rodolfo:tmp $ ln slide-demo.obj new.obj /bin/ln: creating hard link `new.obj' to `slide-demo.obj': Operation not permitted rodolfo:tmp $ chown root.root slide-demo.obj rodolfo:tmp $ ls -l slide-demo.obj -rw------- 1 root root 3096 Aug 29 20:37 slide-demo.obj rodolfo:tmp $ ln slide-demo.obj new.obj rodolfo:tmp $ rodolfo:tmp $ ls -l slide-demo.obj new.obj -rw------- 2 root root 3096 Aug 29 20:37 new.obj -rw------- 2 root root 3096 Aug 29 20:37 slide-demo.obj rodolfo:tmp $
On any other SuSE-installed LInux machines with the same rpms installed, the "root" is "root", the hard link succeeded without a hitch even when the file's owner is not "root". I understand the latter behavior is the correct one. The security setting within yast2 on all machines are the same.
Are you sure you were root? Odd $ prompt thru me... By the way, do a "man chattr" and you will see that there are some file attributes that prevent even root from doing things to files - see in particular attribute "i". I'm not saying thats what happened here, its just one possibility. -- _____________________________________ John Andersen
participants (2)
-
Hugh Song
-
John Andersen