Unable to see dircetories - Unix

This is a discussion on Unable to see dircetories - Unix ; Hi all, I am unable to see directories in home users area. I can enter the directory by doing cd explicitly. But when i do 'ls' in the home users area, i cant see the user directory ?? Can anyone ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Unable to see dircetories

  1. Unable to see dircetories

    Hi all,
    I am unable to see directories in home users area.
    I can enter the directory by doing cd explicitly.
    But when i do 'ls' in the home users area, i cant see the user
    directory ??
    Can anyone please tell me , which command to be used to see the
    directories.

    Thanks in advance


  2. Re: Unable to see dircetories

    ineffable_trance@yahoo.co.uk wrote:
    > I am unable to see directories in home users area.


    Are you allowed to?

    > I can enter the directory by doing cd explicitly. But when i do
    > 'ls' in the home users area, i cant see the user directory ??


    Is there an x bit which matches you on the parent directory?

    > Can anyone please tell me , which command to be used to see the directories.


    ls, provided you have permission.

    - Philip

    --
    Philip Paeps Please don't email any replies
    philip@paeps.cx I follow the newsgroup.

    If things were left to chance, they'd be better.

  3. Re: Unable to see dircetories

    ineffable_trance@yahoo.co.uk said the following, on 11/10/05 11:18:
    > Hi all,
    > I am unable to see directories in home users area.
    > I can enter the directory by doing cd explicitly.
    > But when i do 'ls' in the home users area, i cant see the user
    > directory ??


    Your difficulty almost certainly has nothing to do with the command you
    are using, and is related to the permissions you have on the user's home
    directory.

    Having 'x' (execute) permission in a directory means you can use it in a
    path, and can 'cd' to it from its parent. In order to _list_ the
    contents of a directory, you must have read permission on it. Consider
    the following example:

    rgibbs@rich02:~/tmp$ pwd
    /home/rgibbs/tmp
    rgibbs@rich02:~/tmp$ mkdir tmp-a
    rgibbs@rich02:~/tmp$ cd tmp-a
    rgibbs@rich02:~/tmp/tmp-a$ ls -la
    total 8
    drwxr-x--- 2 rgibbs rgibbs 4096 Nov 10 15:59 .
    drwxr-xr-x 5 rgibbs staff 4096 Nov 10 15:59 ..
    rgibbs@rich02:~/tmp/tmp-a$ cd ..
    rgibbs@rich02:~/tmp$ chmod 100 tmp-a
    rgibbs@rich02:~/tmp$ cd tmp-a
    rgibbs@rich02:~/tmp/tmp-a$ ls -la
    ls: .: Permission denied
    rgibbs@rich02:~/tmp/tmp-a$ chmod 500 .
    rgibbs@rich02:~/tmp/tmp-a$ ls -la
    total 8
    dr-x------ 2 rgibbs rgibbs 4096 Nov 10 15:59 .
    drwxr-xr-x 5 rgibbs staff 4096 Nov 10 15:59 ..

    (NB: numeric permissions are octal, and sum:
    4 = read
    2 = write
    1 = execute
    )


    --
    Rich Gibbs
    richg74@gmail.com
    "If you find yourself in a hole, stop digging." -- Will Rogers


+ Reply to Thread