LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   drwxr-xr-x but read-only? (https://www.linuxquestions.org/questions/linux-general-1/drwxr-xr-x-but-read-only-430322/)

marychin 03-31-2006 09:16 AM

drwxr-xr-x but read-only?
 
Hi.

Funny... one of my filesystem has gone read-only without my command...
As root, I get these:
=================================================================
# rm /usr/bin/bous
rm: remove write-protected regular file `/usr/bin/bous'? y
rm: cannot remove `/usr/bin/bous': Read-only file system

# cat >/usr/bin/gal
/usr/bin/gal: Read-only file system.

# ll -a /usr
total 232
drwxr-xr-x 19 root root 4096 Oct 11 2003 .
drwxr-xr-x 25 root root 4096 Feb 15 15:50 ..
drwxr-xr-x 2 root root 61440 Aug 1 2005 bin

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 6.3G 5.8G 160M 98% /usr

# grep hda2\ /etc/mtab
/dev/hda2 /usr ext3 rw 0 0
=================================================================

Thanks.

:)

Centinul 03-31-2006 09:21 AM

Looking at your ls output you see the "d" all the way to the left? That means it's a directory. To my knowledge a directory can have different permissions then the files underneath it. Try doing the ls command inside the /usr/bin directory to really see what's going wrong. I'm not sure if this is it, but it's something to look at. Hope this helps.

marychin 03-31-2006 09:23 AM

$ ll /usr/bin/bous
-rwxr-xr-x 1 root root 19 Oct 10 2003 bous*

:)

marozsas 03-31-2006 10:14 AM

Issue the command "mount", as root, withou any arguments. It will show all mounted partitions and modes. Check the affected file system is mounted as (rw) or (ro).

marychin 03-31-2006 10:33 AM

/dev/hda2 on /usr type ext3 (rw)

thanx.

marozsas 03-31-2006 10:42 AM

Ouch !

It is unusual ! Check if this happens in single user mode (telinit s). In the single user mode, try to umount /usr and mount it again. Reports any message.

marychin 04-03-2006 04:53 AM

problem sorted after rebooting with some inode fixes.
cheers everyone.


All times are GMT -5. The time now is 10:16 AM.