Why does 'cd' not work on an entry with 'directory' attribute?

1

My OS is fedora 20. I act as a root user.

under / directory, I input:

#ll
...
d????????? ? ? ? ? mnt
...

#cd mnt
bash: cd: mnt: Not a directory

#chmod 777 mnt
chmod: cannot access 'mnt': No such file or directory

What's the root cause of such a weird problem?

xmllmx

Posted 2014-04-08T09:10:04.207

Reputation: 403

what directory are you in? You may need to 'cd /mnt' – mcalex – 2014-04-08T09:15:15.437

I'm under the root directory – xmllmx – 2014-04-08T09:28:50.653

Answers

3

If the ?s in the output of ls -l are that what it really says, then you most-likely have a filesystem mounted to /mnt that is no more (removed USB stick, bus-failure, f*cked up filesystem, …). You'll have to umount the filesystem to get things straight again.

If you just mounted the filesystem and this is the result, try fscking the filesystem (after umount, of course).

If there's no filesystem mounted to /mnt and this is the real /mnt directory on your /-fs, then get a live rescue CD, check your filesystems and pray.

Andreas Wiese

Posted 2014-04-08T09:10:04.207

Reputation: 1 911