ls succeds but not ls -a

Hi,
When i do ls on my home directory /home/user i succeed but i don’t see any output for ls -a. The session just hangs.

When i try to open a a directory through a editor i can see the files and directories under the directory.

When i try to open my /home/user through a editor i get a error saying illegal file.

I can get around this by creating another user and copying rest of the stuff.

I don’t want to do that. Can someone think of what could be the problem.

thanks

Do you have a Live CD, or the capacity to make one?

A filesystem / permission problem might be more easily spotted from outside the system…

Maybe before going as far as Confuseling suggests, you could first become root in the terminal by

su -

and the root password. And then do the

ls -d /home/user/
ls /home/user/
ls -a /home/user/

See if there are strange things there. When in doubt post the output here.

Edit: and yes, is your /home on a seperate partition as Confuselings’ method suggest?

My /home is not on separate partition.
There is a directory called .gvfs which has been created inside the my home directory. ls as root gives the error message that ls command cannot access .gvfs : Permission denied. I am not able to delete the file even as root(also as normal user). Also i am not able to change permissions or change ownership of the file.

i will try burning a live CD and check it out. What exact commands should i run with the live cd.

I guess to start with just go root, mount the filesystem, and try hcv’s suggestions. Maybe run ‘ls -la’, or ‘file *’ in the directory concerned as well. Hopefully that’ll show up some kind of oddity…

Will it show anything more than what is showing now.

both ls -la and file * fail on that file with permission denied error message. This happens when i run the command both as user and root.

No idea - that’s kind of the point of doing from outside. :slight_smile:

If the problem’s with the files (or a file), which in my inexpert opinion it sounds like it probably is, you will confirm that by looking at it from a completely separate system. From there I suppose you try to recreate the broken folder, or fsck the filesystem - which you could admittedly do from your main system. Hopefully someone more knowledgeable will be able to comment on proceeding from here.

But the point is more information never fails to help (and neither does having a live CD lying around).

Does ls -a when in a different directory work OK (try ls -a /etc for example). If this works as expected, the use a live cd and delete the .gvfs directory.
By default, linux allows all users permission to list files. So there is something fishy with.gvfs in your home directory)

On Mon, 07 Sep 2009 21:36:04 +0000, gudgeforums wrote:

> Will it show anything more than what is showing now.
>
> both ls -la and file * fail on that file with permission denied error
> message. This happens when i run the command both as user and root.

It isn’t by chance a fuse-mounted filesystem, is it? (That’s the only
case I’ve seen where root couldn’t view the files).

Jim


Jim Henderson
openSUSE Forums Moderator

Thanks i deleted the file using Live CD… it worked… Inever installed fuse… i don’t know from where it came …

They’re a standard feature of gnome installations. You can find out something by googling .gvfs

Couldn’t tell you what it does though :wink:

On Wed, 09 Sep 2009 02:06:01 +0000, Confuseling wrote:

> They’re a standard feature of gnome installations. You can find out
> something by googling .gvfs
>
> Couldn’t tell you what it does though :wink:

That makes two of us. And I’ve wondered…

Jim


Jim Henderson
openSUSE Forums Moderator

It’s GNOME’s virtual file system. It’s goal is to make remote file systems accessible as if they were local file systems. Found some writings that compared it to the KIO technology.

On Wed, 09 Sep 2009 07:06:01 +0000, Knurpht wrote:

> It’s GNOME’s virtual file system. It’s goal is to make remote file
> systems accessible as if they were local file systems. Found some
> writings that compared it to the KIO technology.

I’ll have to look and see how to use it - I tend to use NFS and fuse-
mounted loopback filesystems (occasionally over an NFS connection).

Jim


Jim Henderson
openSUSE Forums Moderator