Solved

file directory permission

Posted on 2002-05-18
9
325 Views
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..  ????

thanks,
hl
0
Comment
Question by:bhuey_ling
[X]
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
9 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 100 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).
0
 
LVL 5

Expert Comment

by:ecw
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.
0
 

Author Comment

by:bhuey_ling
ID: 7020460
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
0
Technology Partners: 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

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

Author Comment

by:bhuey_ling
ID: 7023039
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
0
 
LVL 51

Expert Comment

by:ahoffmann
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
0
 

Author Comment

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

rgds,
hl
0
 
LVL 21

Expert Comment

by:tfewster
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

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7967077
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: 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!

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 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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

730 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