Solved

file directory permission

Posted on 2002-05-18
9
315 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
9 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
can you please post the permissions of you master directory
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:bhuey_ling
Comment Utility
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
Comment Utility
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
Comment Utility
nop.. I'm using the same user when i do ls -la in both dir but not "common" ...

rgds,
hl
0
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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 …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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…
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now