Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: ls succeds but not ls -a

  1. #1

    Default 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

  2. #2

    Default Re: ls succeds but not ls -a

    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...

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: ls succeds but not ls -a

    Maybe before going as far as Confuseling suggests, you could first become root in the terminal by
    Code:
    su -
    and the root password. And then do the
    Code:
    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?
    Henk van Velden

  4. #4

    Default Re: ls succeds but not ls -a

    Quote Originally Posted by hcvv View Post
    Maybe before going as far as Confuseling suggests, you could first become root in the terminal by
    Code:
    su -
    and the root password. And then do the
    Code:
    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.

  5. #5

    Default Re: ls succeds but not ls -a

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

  6. #6

    Default Re: ls succeds but not ls -a

    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...

  7. #7

    Default Re: ls succeds but not ls -a

    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.

  8. #8

    Default Re: ls succeds but not ls -a

    No idea - that's kind of the point of doing from outside.

    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).

  9. #9
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: ls succeds but not ls -a

    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)

  10. #10
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,317

    Default Re: ls succeds but not ls -a

    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

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •