Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This may look like a weird question, but I just got this output for a file (directory?) in my system. This may be a trivial or well-known error, but for me, this file (directory?) called ksmserver.notifyrc is a mystery.

[orly at kde-workspace on master]$ rm -fv /home/orly/ksmserver.notifyrc                                   2:06
rm: cannot remove `/home/orly/ksmserver.notifyrc': Is a directory

[orly at kde-workspace on master]$ rm -rfv /home/orly/ksmserver.notifyrc                                  2:09
rm: cannot remove `/home/orly/ksmserver.notifyrc/kscreenlocker.notifyrc': Permission denied

[orly at kde-workspace on master]$ ls -al /home/orly/ksmserver.notifyrc                                   2:09
ls: cannot access /home/orly/ksmserver.notifyrc/..: Permission denied
ls: cannot access /home/orly/ksmserver.notifyrc/kscreenlocker.notifyrc: Permission denied
ls: cannot access /home/orly/ksmserver.notifyrc/.: Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? kscreenlocker.notifyrc

[orly at kde-workspace on master]$ sudo rm -rfv  /home/orly/ksmserver.notifyrc                            2:09
[sudo] password for orly: 
removed `/home/orly/ksmserver.notifyrc/kscreenlocker.notifyrc'
removed directory: `/home/orly/ksmserver.notifyrc'

What I'd like to understand is,

  1. What is ksmserver.notifyrc - a file or a directory?
  2. Why does ls display question marks instead of attributes?
  3. Why does ls list the contents of that file (directory?), but no further?

This is the first time I encounter such kind of output from ls. Any advice is really appreciated!

Fedora Linux 64bit, latest stable release.

Is this maybe a corrupted fs in need of an fsck?

share|improve this question
    
Now why is this question voted down? Is it invalid? Why was the fsck notice removed? See, if I'm asking a question, that means I know little about the possible answer! I'm adding the fsck question back. –  Semen Semenych Jan 15 '13 at 11:43
add comment

3 Answers

up vote 2 down vote accepted

It is a directory where you have read permissions (You can access the directory entry on the file system) but you don't have execute permissions so you can't list it's contents. Then you have read access to the kscreenlocker.notifyrc file but to list any information about it you need execute permissions on the containing dir.

To recreate the situation do this:

$ mkdir testdir
$ touch testdir/testfile
$ chmod -x testdir
$ ls -al testdir

ls: cannot access testdir/testfile: Permission denied
ls: cannot access testdir/..: Permission denied
ls: cannot access testdir/.: Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? testfile
share|improve this answer
    
This is it! Thank you :) I'll consult Stevens & Rago for further information. –  Semen Semenych Jan 15 '13 at 11:40
add comment

1)what is "ksmserver.notifyrc" - a file or a dir?

It is a file, hence the - in the first column.

2)why does ls display question marks instead of attributes? 3)why does ls list the contents of that file (dir?), but no further?

You do not have execute permissions on the directory that contains it, therefore can only get minimal information about the contents.

share|improve this answer
add comment
  1. It is a directory.
  2. I believe it didn't even had read access to the directory (something like that).
  3. See #2. I suppose it's one of these weird permission interactions.

It would have been interesting to know the permissions of ksmserver.notifyrc itself.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.