bharbour111
asked on
Unable to access local directory
After installing CentOS 5, I am unable to access the /usr/local directory, even as root. I can chmod, chgrp, chown, but receive the error "-bash: cd: /usr/local: No such file or directory" when trying to access it. I cannot rm, mv, or anything to the directory. ls yeilds: "drwxrwxrwx 2 root users 0 Aug 7 10:56 local"
I'm about ready to reformat and reinstall, but if someone has a fix it would be most appreciated.
I'm about ready to reformat and reinstall, but if someone has a fix it would be most appreciated.
ASKER
The ls -l command shows
"drwxrwxrwx 2 root users 0 Aug 7 10:56 local"
after chmod 777 local and chgrp users local
I performed a reinstall, selecting reformat existing linux partitions and still had the same problem. I then ran dban to wipe the drive and currently in the process of reinstalling again, useing ext2 format instead of ext3.
I'll let you know if the problem is still present in just a little bit.
Thanks
"drwxrwxrwx 2 root users 0 Aug 7 10:56 local"
after chmod 777 local and chgrp users local
I performed a reinstall, selecting reformat existing linux partitions and still had the same problem. I then ran dban to wipe the drive and currently in the process of reinstalling again, useing ext2 format instead of ext3.
I'll let you know if the problem is still present in just a little bit.
Thanks
Please check if the system is mounted read-only (post the output of 'mount')
//jonas
//jonas
ASKER
Reinstalled CentOS 5 -- same issue. See the following mount, df, and ls command posts.
[root@gifford usr]# cd local/
bash: cd: local/: No such file or directory
[root@gifford usr]# mount
/dev/mapper/VolGroup00-Log Vol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@gifford usr]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-Log Vol00
72G 2.9G 65G 5% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 248M 0 248M 0% /dev/shm
[root@gifford usr]# ls -l
total 236
drwxr-xr-x 2 root root 65536 Aug 8 20:11 bin
drwxr-xr-x 2 root root 4096 Mar 29 2007 etc
drwxr-xr-x 2 root root 4096 Mar 29 2007 games
drwxr-xr-x 77 root root 12288 Aug 8 20:10 include
drwxr-xr-x 6 root root 4096 Nov 10 2007 kerberos
drwxr-xr-x 115 root root 53248 Aug 8 20:11 lib
drwxr-xr-x 13 root root 4096 Aug 8 20:09 libexec
drwxr-xr-x 2 root root 0 Aug 8 20:18 local
drwxr-xr-x 2 root root 16384 Aug 8 20:10 sbin
drwxr-xr-x 222 root root 12288 Aug 8 20:11 share
drwxr-xr-x 4 root root 4096 Aug 8 20:10 src
lrwxrwxrwx 1 root root 10 Aug 8 19:57 tmp -> ../var/tmp
drwxr-xr-x 3 root root 4096 Aug 8 19:58 X11R6
[root@gifford usr]# cd local/
bash: cd: local/: No such file or directory
[root@gifford usr]# mount
/dev/mapper/VolGroup00-Log
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@gifford usr]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-Log
72G 2.9G 65G 5% /
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 248M 0 248M 0% /dev/shm
[root@gifford usr]# ls -l
total 236
drwxr-xr-x 2 root root 65536 Aug 8 20:11 bin
drwxr-xr-x 2 root root 4096 Mar 29 2007 etc
drwxr-xr-x 2 root root 4096 Mar 29 2007 games
drwxr-xr-x 77 root root 12288 Aug 8 20:10 include
drwxr-xr-x 6 root root 4096 Nov 10 2007 kerberos
drwxr-xr-x 115 root root 53248 Aug 8 20:11 lib
drwxr-xr-x 13 root root 4096 Aug 8 20:09 libexec
drwxr-xr-x 2 root root 0 Aug 8 20:18 local
drwxr-xr-x 2 root root 16384 Aug 8 20:10 sbin
drwxr-xr-x 222 root root 12288 Aug 8 20:11 share
drwxr-xr-x 4 root root 4096 Aug 8 20:10 src
lrwxrwxrwx 1 root root 10 Aug 8 19:57 tmp -> ../var/tmp
drwxr-xr-x 3 root root 4096 Aug 8 19:58 X11R6
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Two (stupid) questions;
1. is there an /usr/local directory (post the output of 'ls /usr'
2. is the filesystem mounted read-only (post the output of 'mount')
If the filesystem is mounted read-only you can remount it (mount -o rw,remount /).
//jonas