I am having wierd situation. I am using ubuntu 14.10. I can open all directories in nautilus but when I try to list files in terminal, only one directory get listed. I can traverse through the directory and open subdirectories in that in nautilus. But ls output of terminal shows no files! And I observed that the total count is correct incuding the . and .. dirs. Also the permissions of the parent folder changed to drwsrwsrwt. The ls output is shown below

me@linuxbox:/media/me/workspace$ ls
docker
me@linuxbox:ls -al
total 12
drwsrwsr-x  3 me me 4096 Apr  4 11:25 .
drwxr-x---+ 8 root    root    4096 Apr  4 20:48 ..
drwsrwsr-x  2 me me 4096 Apr  4 11:25 docker

This is my private docker registry and along with that there are several other folders. They get listed in nautilus without any problems but is not shown in terminal.

the ls output of parent directory is as below

me@linuxbox:/media/me$ ls -al
total 32
drwxr-x---+  8 root    root    4096 Apr  4 20:48 .
drwxr-xr-x   3 root    root    4096 Apr  4 20:09 ..
drwxr-xr-x  24 root    root    4096 Apr  2 23:11 1c2bb1cb-19b3-4fb6-8298-15cf50fa7257
drwxr-xr-x   4 root    root    4096 Apr  2 23:08 312ca6a5-7909-475c-bcff-54fdcde364d7
drwsrwsrwt   4 me me 4096 Apr  1 23:33 drive
drwxr-xr-x   7 me me 4096 Apr  2 21:47 media
drwsrwsr-x   3 me me 4096 Apr  4 11:25 workspace
drwsrwsrwt  11 me me 4096 Apr  2 23:51 workspace1

The directory workspace1 was not manually created. Is this a rootkit? . If I log in to debian and list file in terminal using ls, all the folders get displayed and permissions on the directories are same as ubuntu. I tried restarting, but it didnt help. Also, ls -alq,find . -ls and getfacl inside workspace directory are as shown below

me@linuxbox:/media/me/workspace$ ls -alq
total 12
drwsrwsr-x  3 me me 4096 Apr  4 11:25 .
drwxr-x---+ 4 root    root    4096 Apr  4 22:18 ..
drwsrwsr-x  2 me me 4096 Apr  4 11:25 docker

me@linuxbox:/media/me/workspace$ find . -ls
786435    4 drwsrwsr-x   3 me  me      4096 Apr  4 11:25 .
786436    4 drwsrwsr-x   2 me  me      4096 Apr  4 11:25 ./docker

me@linuxbox:/media/me/workspace$ getfacl ..
# file: ..
# owner: root
# group: root
user::rwx
user:me:r-x
group::---
mask::r-x
other::---

The most recent changes in my system are docker installation and debian installation. Can anyone help me out?

share|improve this question
    
Now do this with sudo ls and sudo ls -al ;) – Rinzwind Apr 4 '15 at 16:17
    
Its produces the same output. I have already tried it ;) – cutteeth Apr 4 '15 at 16:39
    
Hmm... can you show what it looks like in Nautilus, with a screenshot? Also, for a folder foo in workspace that's not shown by ls and find (replace foo with a name of an actual such folder, of course), can you view its metadata with ls by running ls -ld foo and its contents with ls -l foo? (You can also try find foo -maxdepth 1 -ls to attempt listing both it and its contents, or with -maxdepth 0 to try to list it only.) I wonder also, considering how the folder became 7777 (rwsrwsrwt), if it's a problem with how /media/me is mounted. What's the full output of mount? – Eliah Kagan Apr 4 '15 at 17:50
    
In your first ls output it says drwxr-x---+ 8 root root 4096 Apr 4 20:48 .. , the parent directory (/media/me) belongs to root. Might be the issue , perhaps ? try sudo chown me:me /media/me. Also, notice in the second output drwxr-x---+ 8 root root 4096 Apr 4 20:48 . , says root group and root owner can read it, but others don't have any permissions. Nautilus is launched at startup by init, right ? so it belongs to root, which may explain why you can see stuffs there – Sergiy Kolodyazhnyy Apr 4 '15 at 18:05
    
@Serg: Since when is nautilus started by init? It's supposed to be part of a user session. – David Foerster Apr 4 '15 at 19:11
up vote 0 down vote accepted

The directory /media/me/workspace1 contains all the files as per nautilus and is accessible without any issues. I have linked /tmp to /media/me/workspace/docker while setting up docker registry. After that permissions of tmp and /media/workspace/docker were the same(drwsrwsr-x). Also all the drives that were mounted while I linked tmp to /media/me/workspace/docker have the same permissions as of the workspace directory and all they have a renamed copy eg: drive1 for drive in /media/me directory. I can access these directories (eg:drive1) without any issues Thanks for the support :)

share|improve this answer

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.