Link to home
Start Free TrialLog in
Avatar of bhuey_ling
bhuey_ling

asked on

file directory permission

I have a directory /fs/hl/src/a/

Below is the command I use:
%ls -la src/
total 16
drwxr-xr-x    4 hl   aaa           512 May 18 14:05 .
drwxr-xr-x    4 hl   aaa           512 May 18 14:05 ..
drw-r--r--    2 hl   aaa           512 May 18 14:05 a
drw-r--r--    2 hl   aaa           512 May 18 14:06 b

%ls -la src/a/
ls: src/a/.: Permission denied
ls: src/a/..: Permission denied
ls: src/a/a: Permission denied

%ls src/a/
ls: src/a/a: Permission denied

Why I cannot read file/directory in src/a since my src/ directory permission is open to read?

This cause me a problem when I try to use rsync command.. my master directory have same file permission as this and i can do "ls" at master directory but when i rsync the whole master directory to my own disk space.. I get permission denied..  ????

thanks,
hl
ASKER CERTIFIED SOLUTION
Avatar of Peter Kwan
Peter Kwan
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ecw
ecw

execuutable perms make the dir searchable.  one thing that needs search perms is stat, which ls -l needs.  A plain ls or ls -a will show the dir contents because you have read perms.  So pkwan is correct, you do need x perms to see what the things in the dir are, or to see anything in the dirs subdirs.
Avatar of bhuey_ling

ASKER

Hi,

yes. Once I change to --x, I can do ls -la.

However, the strange is I get this file permission structure from a master copy directory. It have the same structure that without "x" perms. But i still can do ls -la at that master directory but not my own. I wonder why the master copy can do ls -la? Is there any tricks there?

This give problem in the half way of my rsync process. I cannot continue to rsync that particular directory stuff to my own diskspace. my diskspace will not allowed rsync to mkdir with error message "permission denied".


thanks,
hl
can you please post the permissions of you master directory
Hi,

here is master copy permissions: The one which cause problem : thailand/
%ls -la /afs/proj/datacom/coz/
total 34

drwxr-xr-x    17 ownera    ib          2048 Sep  7  2000 .
drwxr-xr-x    27 ownera    ib          2048 Feb 14  2000 ..
drw-r--r--   31 ownerb    ib         2048 Mar 16  1999 raffles
drwxrwxrwx   7 ownera    ib          2048 Jun 28  2001 backup
drw-r--r--   23 common     ib          2048 Apr 16  1999 golden
drw-r--r--   14 common     ib          2048 Dec 19  1999 database
drw-r--r--   8 common     ib          2048 Dec 14  2000 machine
drw-r--r--   6 common     ib          2048 Feb  1 15:14 hill
drw-r--r--   25 ownera    ib          2048 Sep 28  2001 mountain
drwxrwxrwx    34 onwera    ib          2048 Apr  7  1998 ocean
drwxrwxrwx   14 root     amin        2048 Nov 16  2000 everest
drwxr-xr-x   11 peter ib          2048 Mar 13 17:25 glory
drw-r--r--   31 kia   ib          2048 Oct 10  2000 stanford
drwxrwxrwx   13 onwera    ib          2048 Apr  1 09:08 chowkit
drwxr-xr-x   9 common     ib          2048 Apr 12 09:06 america
drw-r--r--   17 common     ib          2048 May  5  1997 africa
drw-r--r--   34 common     ib          2048 Apr 18 11:09 thailand


%ls -la /afs/proj/datacom/thailand
total 3
drw-r--r--   19 common     ib          2048 Apr 18 11:09 .
drwxr-xr-x    7 ownera    ib          2048 Sep  7  2000 ..
drwxrwxrwx    31 ownera    ib          2048 Apr 16 14:15 chengmai
drwxrwxrwx    13 ownera    ib          2048 Apr 16 14:15 bangkok
drwxrwxrwx   11 ownera    ib          2048 Oct 30  2001 phuket
I asume that you're user common when you do the ls -la on .../thailand, while you're another user when you do the rsync
nop.. I'm using the same user when i do ls -la in both dir but not "common" ...

rgds,
hl
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by pkwan

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange