* Query - Regarding strange behaviour.
@ 2005-02-03 14:45 Pankaj Agarwal
2005-02-03 15:10 ` Martijn van Oosterhout
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Pankaj Agarwal @ 2005-02-03 14:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Linux Net
Hi,
In my system there's a strange behaviour.... its not allowing me to create
any file in /usr/bin even as root. Its chmod is set to 755. Its even not
allowing me to change the chmod value of /usr/bin. The strangest part which
i felt is ...its shows the owner and group as root when i issue command
"ls -ld /usr/bin" and not allowing root to create any file or directory
under /usr/bin and not even allowing to change the chmod value. The error is
access permission denied... I can change the chmod value of /usr and other
directories under /usr/...but not of bin....
I need your help/support. kindly let me know what all can i try to resolve
this problem.
Thanks and Regards,
Pankaj Agarwal
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Query - Regarding strange behaviour. 2005-02-03 14:45 Query - Regarding strange behaviour Pankaj Agarwal @ 2005-02-03 15:10 ` Martijn van Oosterhout 2005-02-03 15:31 ` Tim Schmielau 2005-02-03 15:35 ` linux-os 2 siblings, 0 replies; 12+ messages in thread From: Martijn van Oosterhout @ 2005-02-03 15:10 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: linux-kernel, Linux Net [-- Attachment #1: Type: text/plain, Size: 1359 bytes --] Try: lsattr /usr/bin Hope this helps, On Thu, Feb 03, 2005 at 08:15:39PM +0530, Pankaj Agarwal wrote: > Hi, > > In my system there's a strange behaviour.... its not allowing me to create > any file in /usr/bin even as root. Its chmod is set to 755. Its even not > allowing me to change the chmod value of /usr/bin. The strangest part which > i felt is ...its shows the owner and group as root when i issue command > "ls -ld /usr/bin" and not allowing root to create any file or directory > under /usr/bin and not even allowing to change the chmod value. The error > is access permission denied... I can change the chmod value of /usr and > other directories under /usr/...but not of bin.... > > I need your help/support. kindly let me know what all can i try to resolve > this problem. > > Thanks and Regards, > > Pankaj Agarwal > > - > To unsubscribe from this list: send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 14:45 Query - Regarding strange behaviour Pankaj Agarwal 2005-02-03 15:10 ` Martijn van Oosterhout @ 2005-02-03 15:31 ` Tim Schmielau 2005-02-03 15:34 ` Pankaj Agarwal 2005-02-03 15:43 ` linux-os 2005-02-03 15:35 ` linux-os 2 siblings, 2 replies; 12+ messages in thread From: Tim Schmielau @ 2005-02-03 15:31 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: linux-kernel, Linux Net On Thu, 3 Feb 2005, Pankaj Agarwal wrote: > In my system there's a strange behaviour.... its not allowing me to create > any file in /usr/bin even as root. Its chmod is set to 755. Its even not > allowing me to change the chmod value of /usr/bin. The strangest part which > i felt is ...its shows the owner and group as root when i issue command > "ls -ld /usr/bin" and not allowing root to create any file or directory > under /usr/bin and not even allowing to change the chmod value. The error is > access permission denied... I can change the chmod value of /usr and other > directories under /usr/...but not of bin.... Maybe /usr is mounted read-only? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 15:31 ` Tim Schmielau @ 2005-02-03 15:34 ` Pankaj Agarwal 2005-02-03 15:43 ` linux-os 1 sibling, 0 replies; 12+ messages in thread From: Pankaj Agarwal @ 2005-02-03 15:34 UTC (permalink / raw) To: Tim Schmielau; +Cc: linux-kernel, Linux Net this isn't the case as i am able to create, edit and delete files in other directories under /usr. ----- Original Message ----- From: "Tim Schmielau" <tim@physik3.uni-rostock.de> To: "Pankaj Agarwal" <pankaj@toughguy.net> Cc: <linux-kernel@vger.kernel.org>; "Linux Net" <linux-net@vger.kernel.org> Sent: Thursday, February 03, 2005 9:01 PM Subject: Re: Query - Regarding strange behaviour. > On Thu, 3 Feb 2005, Pankaj Agarwal wrote: > >> In my system there's a strange behaviour.... its not allowing me to >> create >> any file in /usr/bin even as root. Its chmod is set to 755. Its even not >> allowing me to change the chmod value of /usr/bin. The strangest part >> which >> i felt is ...its shows the owner and group as root when i issue command >> "ls -ld /usr/bin" and not allowing root to create any file or directory >> under /usr/bin and not even allowing to change the chmod value. The error >> is >> access permission denied... I can change the chmod value of /usr and >> other >> directories under /usr/...but not of bin.... > > Maybe /usr is mounted read-only? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 15:31 ` Tim Schmielau 2005-02-03 15:34 ` Pankaj Agarwal @ 2005-02-03 15:43 ` linux-os 1 sibling, 0 replies; 12+ messages in thread From: linux-os @ 2005-02-03 15:43 UTC (permalink / raw) To: Tim Schmielau; +Cc: Pankaj Agarwal, linux-kernel, Linux Net On Thu, 3 Feb 2005, Tim Schmielau wrote: > On Thu, 3 Feb 2005, Pankaj Agarwal wrote: > >> In my system there's a strange behaviour.... its not allowing me to create >> any file in /usr/bin even as root. Its chmod is set to 755. Its even not >> allowing me to change the chmod value of /usr/bin. The strangest part which >> i felt is ...its shows the owner and group as root when i issue command >> "ls -ld /usr/bin" and not allowing root to create any file or directory >> under /usr/bin and not even allowing to change the chmod value. The error is >> access permission denied... I can change the chmod value of /usr and other >> directories under /usr/...but not of bin.... > > Maybe /usr is mounted read-only? Hmmm, are distros still 'slicing up' the root file-system? Good point! Cheers, Dick Johnson Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 14:45 Query - Regarding strange behaviour Pankaj Agarwal 2005-02-03 15:10 ` Martijn van Oosterhout 2005-02-03 15:31 ` Tim Schmielau @ 2005-02-03 15:35 ` linux-os 2005-02-03 15:45 ` Pankaj Agarwal 2 siblings, 1 reply; 12+ messages in thread From: linux-os @ 2005-02-03 15:35 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: linux-kernel, Linux Net On Thu, 3 Feb 2005, Pankaj Agarwal wrote: > Hi, > > In my system there's a strange behaviour.... its not allowing me to create > any file in /usr/bin even as root. Its chmod is set to 755. Its even not > allowing me to change the chmod value of /usr/bin. The strangest part which i > felt is ...its shows the owner and group as root when i issue command "ls -ld > /usr/bin" and not allowing root to create any file or directory under > /usr/bin and not even allowing to change the chmod value. The error is access > permission denied... I can change the chmod value of /usr and other > directories under /usr/...but not of bin.... > > I need your help/support. kindly let me know what all can i try to resolve > this problem. > > Thanks and Regards, > > Pankaj Agarwal See if your file-system has gotten hurt. Boot with init=/bin/bash and execute `/sbin/fsck -f /` to force a check of the root file-system. The next check is to see if you can fix the protections when you are the only one accessing the file-system: # mount -n -o remount / # re-mount root r/w # cd /usr # chmod 755 bin # ls -la # See if it worked # unmount / The next check is to replace the /usr/bin directory. Since `mv` and `mkdir` are in /bin, the following should work. # mount -n -o remount / # re-mount root r/w # cd /usr # mv bin foo # Rename 'strange' directory # mkdir bin # Make a new one # cd foo # Change to original # mv * ../bin # Rename all contents to new # cd .. # rmdir foo # Remove bad directory # chmod 755 bin # Fix protection # umount / After you have fixed things, you don't have to re-boot. Just execute: # exec /sbin/init auto Cheers, Dick Johnson Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 15:35 ` linux-os @ 2005-02-03 15:45 ` Pankaj Agarwal 2005-02-03 16:00 ` linux-os 2005-02-03 16:07 ` S Iremonger 0 siblings, 2 replies; 12+ messages in thread From: Pankaj Agarwal @ 2005-02-03 15:45 UTC (permalink / raw) To: linux-os; +Cc: linux-kernel, Linux Net its not even allowing me to copy it ...then surely it wont allow me mv as well... what else can i try... [root@test root]# mount /dev/hda2 on / type ext3 (rw) none on /proc type proc (rw) usbdevfs on /proc/bus/usb type usbdevfs (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) none on /dev/shm type tmpfs (rw) [root@test /]# cd /usr [root@test usr]# cp bin testbin cp: omitting directory `bin' [root@test usr]# ls bin etc include kerberos libexec sbin src test121212 X11R6 dict games java lib local share test tmp [root@test usr]# ----- Original Message ----- From: "linux-os" <linux-os@analogic.com> To: "Pankaj Agarwal" <pankaj@toughguy.net> Cc: <linux-kernel@vger.kernel.org>; "Linux Net" <linux-net@vger.kernel.org> Sent: Thursday, February 03, 2005 9:05 PM Subject: Re: Query - Regarding strange behaviour. > On Thu, 3 Feb 2005, Pankaj Agarwal wrote: > >> Hi, >> >> In my system there's a strange behaviour.... its not allowing me to >> create any file in /usr/bin even as root. Its chmod is set to 755. Its >> even not allowing me to change the chmod value of /usr/bin. The strangest >> part which i felt is ...its shows the owner and group as root when i >> issue command "ls -ld /usr/bin" and not allowing root to create any file >> or directory under /usr/bin and not even allowing to change the chmod >> value. The error is access permission denied... I can change the chmod >> value of /usr and other directories under /usr/...but not of bin.... >> >> I need your help/support. kindly let me know what all can i try to >> resolve this problem. >> >> Thanks and Regards, >> >> Pankaj Agarwal > > See if your file-system has gotten hurt. Boot with init=/bin/bash > and execute `/sbin/fsck -f /` to force a check of the root file-system. > > The next check is to see if you can fix the protections when > you are the only one accessing the file-system: > > # mount -n -o remount / # re-mount root r/w > # cd /usr > # chmod 755 bin > # ls -la # See if it worked > # unmount / > > The next check is to replace the /usr/bin directory. Since `mv` > and `mkdir` are in /bin, the following should work. > > # mount -n -o remount / # re-mount root r/w > # cd /usr > # mv bin foo # Rename 'strange' directory > # mkdir bin # Make a new one > # cd foo # Change to original > # mv * ../bin # Rename all contents to new > # cd .. # rmdir foo # Remove bad directory > # chmod 755 bin # Fix protection > # umount / > > After you have fixed things, you don't have to re-boot. > Just execute: > > # exec /sbin/init auto > > > Cheers, > Dick Johnson > Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips). > Notice : All mail here is now cached for review by Dictator Bush. > 98.36% of all statistics are fiction. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 15:45 ` Pankaj Agarwal @ 2005-02-03 16:00 ` linux-os 2005-02-03 16:07 ` S Iremonger 1 sibling, 0 replies; 12+ messages in thread From: linux-os @ 2005-02-03 16:00 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: Linux kernel, Linux Net On Thu, 3 Feb 2005, Pankaj Agarwal wrote: > its not even allowing me to copy it ...then surely it wont allow me mv as > well... what else can i try... > You didn't even bother to follow my carefully-written instructions! **PLONK** Since you seem to know everything, go to pound sand. Cheers, Dick Johnson Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 15:45 ` Pankaj Agarwal 2005-02-03 16:00 ` linux-os @ 2005-02-03 16:07 ` S Iremonger 2005-02-03 16:18 ` Pankaj Agarwal 1 sibling, 1 reply; 12+ messages in thread From: S Iremonger @ 2005-02-03 16:07 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: linux-os, linux-kernel, Linux Net >its not even allowing me to copy it ...then surely it wont allow me mv as >well... what else can i try... >[root@test root]# mount >/dev/hda2 on / type ext3 (rw) >[root@test /]# cd /usr >[root@test usr]# cp bin testbin >cp: omitting directory `bin' "cp" does not normally copy direcrories as such by DEFAULT. Use the "-R" flag on "cp" to make it 'recurse' and copy the whole directory and directory/files under it. e.g. "cp -R bin bincopy" And, show us all the results of the following 2 commands, please. ls -ld /usr/bin lsattr -d /usr/bin --S Iremonger <exxsi@bath.ac.uk> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 16:07 ` S Iremonger @ 2005-02-03 16:18 ` Pankaj Agarwal 2005-02-03 16:31 ` Martijn van Oosterhout 2005-02-03 16:33 ` Martin Zwickel 0 siblings, 2 replies; 12+ messages in thread From: Pankaj Agarwal @ 2005-02-03 16:18 UTC (permalink / raw) To: S Iremonger; +Cc: linux-os, linux-kernel, Linux Net my fault...i'm able to copy it using -rf with CP. So, solution given by Dick Johnson (Linux-OS) can be used, if all are unable to find what's the problem... here's the output of the two commands you've asked for.. [root@test usr]# ls -ld /usr/bin drwxr-xr-x 2 root root 61440 Nov 21 20:30 /usr/bin [root@test usr]# lsattr -d /usr/bin su--ia------- /usr/bin ----- Original Message ----- From: "S Iremonger" <exxsi@bath.ac.uk> To: "Pankaj Agarwal" <pankaj@toughguy.net> Cc: <linux-os@analogic.com>; <linux-kernel@vger.kernel.org>; "Linux Net" <linux-net@vger.kernel.org> Sent: Thursday, February 03, 2005 9:37 PM Subject: Re: Query - Regarding strange behaviour. > >its not even allowing me to copy it ...then surely it wont allow me mv as >>well... what else can i try... >>[root@test root]# mount >>/dev/hda2 on / type ext3 (rw) >>[root@test /]# cd /usr >>[root@test usr]# cp bin testbin >>cp: omitting directory `bin' > > "cp" does not normally copy direcrories as such by DEFAULT. > > Use the "-R" flag on "cp" to make it 'recurse' and copy the whole > directory and directory/files under it. > > e.g. "cp -R bin bincopy" > > > And, show us all the results of the following 2 commands, please. > > ls -ld /usr/bin > lsattr -d /usr/bin > > --S Iremonger <exxsi@bath.ac.uk> > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 16:18 ` Pankaj Agarwal @ 2005-02-03 16:31 ` Martijn van Oosterhout 2005-02-03 16:33 ` Martin Zwickel 1 sibling, 0 replies; 12+ messages in thread From: Martijn van Oosterhout @ 2005-02-03 16:31 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: S Iremonger, linux-os, linux-kernel, Linux Net [-- Attachment #1: Type: text/plain, Size: 1956 bytes --] On Thu, Feb 03, 2005 at 09:48:12PM +0530, Pankaj Agarwal wrote: > [root@test usr]# lsattr -d /usr/bin > su--ia------- /usr/bin Well, there's your problem. These mean: s: when deleted, its blocks are zeroed and written back to the disk u: when deleted, its contents are saved. i: cannot be modified: it cannot be deleted or renamed, a: can only be open in append mode for writing Remove those flags with chattr... Hope this helps, > > ----- Original Message ----- > From: "S Iremonger" <exxsi@bath.ac.uk> > To: "Pankaj Agarwal" <pankaj@toughguy.net> > Cc: <linux-os@analogic.com>; <linux-kernel@vger.kernel.org>; "Linux Net" > <linux-net@vger.kernel.org> > Sent: Thursday, February 03, 2005 9:37 PM > Subject: Re: Query - Regarding strange behaviour. > > > >>its not even allowing me to copy it ...then surely it wont allow me mv as > >>well... what else can i try... > >>[root@test root]# mount > >>/dev/hda2 on / type ext3 (rw) > >>[root@test /]# cd /usr > >>[root@test usr]# cp bin testbin > >>cp: omitting directory `bin' > > > >"cp" does not normally copy direcrories as such by DEFAULT. > > > >Use the "-R" flag on "cp" to make it 'recurse' and copy the whole > > directory and directory/files under it. > > > >e.g. "cp -R bin bincopy" > > > > > >And, show us all the results of the following 2 commands, please. > > > >ls -ld /usr/bin > >lsattr -d /usr/bin > > > >--S Iremonger <exxsi@bath.ac.uk> > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Query - Regarding strange behaviour. 2005-02-03 16:18 ` Pankaj Agarwal 2005-02-03 16:31 ` Martijn van Oosterhout @ 2005-02-03 16:33 ` Martin Zwickel 1 sibling, 0 replies; 12+ messages in thread From: Martin Zwickel @ 2005-02-03 16:33 UTC (permalink / raw) To: Pankaj Agarwal; +Cc: S Iremonger, linux-os, linux-kernel, Linux Net [-- Attachment #1: Type: text/plain, Size: 884 bytes --] On Thu, 3 Feb 2005 21:48:12 +0530 "Pankaj Agarwal" <pankaj@toughguy.net> bubbled: > my fault...i'm able to copy it using -rf with CP. So, solution given > by Dick Johnson (Linux-OS) can be used, if all are unable to find > what's the problem... > > here's the output of the two commands you've asked for.. > > [root@test usr]# ls -ld /usr/bin > drwxr-xr-x 2 root root 61440 Nov 21 20:30 /usr/bin > > [root@test usr]# lsattr -d /usr/bin > su--ia------- /usr/bin i = IMMUTABLE, so you are unable to modify it. a = only append mode for writing u = allow undelete s = zero the file if deleted but s and u should currently not work on ext2/3. Try "chattr -iusa /usr/bin" as root. -- MyExcuse: bad ether in the cables Martin Zwickel <martin.zwickel@technotrend.de> Research & Development TechnoTrend AG <http://www.technotrend.de> [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-02-03 16:34 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-02-03 14:45 Query - Regarding strange behaviour Pankaj Agarwal 2005-02-03 15:10 ` Martijn van Oosterhout 2005-02-03 15:31 ` Tim Schmielau 2005-02-03 15:34 ` Pankaj Agarwal 2005-02-03 15:43 ` linux-os 2005-02-03 15:35 ` linux-os 2005-02-03 15:45 ` Pankaj Agarwal 2005-02-03 16:00 ` linux-os 2005-02-03 16:07 ` S Iremonger 2005-02-03 16:18 ` Pankaj Agarwal 2005-02-03 16:31 ` Martijn van Oosterhout 2005-02-03 16:33 ` Martin Zwickel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox