file directory permission

Posted on 2002-05-18
Medium Priority
Last Modified: 2010-04-21
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..  ????

Question by:bhuey_ling
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Accepted Solution

Peter Kwan earned 400 total points
ID: 7019221
This is because you don't have executable access permission("--x" for the directory "a"). The executable access permission is required if you want to go into the directory and/or to see anything that is under that directory.

To solve your problem, you just need to execute chmod to add the executable permission to the directory "a". (i.e. chmod a+x a).

Expert Comment

ID: 7020292
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.

Author Comment

ID: 7020460

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 51

Expert Comment

ID: 7022475
can you please post the permissions of you master directory

Author Comment

ID: 7023039

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
LVL 51

Expert Comment

ID: 7025425
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

Author Comment

ID: 7027347
nop.. I'm using the same user when i do ls -la in both dir but not "common" ...

LVL 21

Expert Comment

ID: 7921172
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


Cleanup Volunteer

Expert Comment

ID: 7967077
per recommendation

Community Support Moderator @Experts Exchange

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question