[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

650 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