Only question marks in Linux dirlisting

I am making a directory in my .ssh home directory that gives me a strange result:

ls -lsa .ssh/ total 0 ? ?--------- ? ? ? ? ? . ยท ? ?--------- ? ? ? ? ? .. ยท ? ?--------- ? ? ? ? ? authorized_keys ยท 

It is strange that this happens only for one user and only in this particular directory. If I do ls after su -l, everything will work as expected. Another weird thing: my xterm shows the directory in a red blinking font! Any ideas what could lead to this?

THX!

Edit:
Listed below is data from the root directory:

 ls -lsa total 52 4 drw------- 2 sdd sdd 4096 Feb 10 15:57 . 4 drwx------ 16 sdd sdd 4096 Feb 10 15:57 .. 4 -rw------- 1 sdd sdd 1628 Feb 10 15:57 authorized_keys 

I am using ext3.

Edit2:
thanks for the answers, but I still get the following:

 chmod -R 600 /home/sdd/.ssh ls -lsan _ssh.old/ total 0 ? ?--------- ? ? ? ? ? . ? ?--------- ? ? ? ? ? .. ? ?--------- ? ? ? ? ? authorized_keys 
+49
linux terminal
Feb 12 '09 at 14:37
source share
1 answer

This occurs when the user cannot do stat () for files (which requires execute permissions), but can read entries in the directory (which requires read access to the directory). Thus, you get a list of files in the directory, but you cannot get information about the files because they cannot be read. :) If you have a directory that has read permission but is not executed, you will see this. Someone probably tried to protect the .ssh directory incorrectly - it should be "chmod 0700.ssh /" and belongs to the user who owns the gomediar. Most likely, someone followed the instructions to protect the .ssh file, but applied it in the .ssh directory. :)

If you do chmod 0600 or 0400 in any directory, you can easily reproduce this behavior. Add execution permission to the directory and it will work fine.

+87
Feb 12 '09 at 15:01
source share



All Articles