LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2013, 11:09 AM   #1
rcmonroig
Member
 
Registered: Mar 2007
Location: Chandler, AZ
Distribution: Fedora 10,12,and 14
Posts: 62
Blog Entries: 1

Rep: Reputation: 15
Question directory access permissions


Linux Support

Running Fedora 14
I log in as max
mkdir info
chmod 701 ./info
ls -l gives me
drwx --- --x max pubs info

I login as zach and run

ls -ld /home/max/info
I should get:

drwx --- --x max pubs /home/max/info

but I get permission denied

should the mode 701 on directory info allow me to list it as long as I name it specifically and use the -ld option?

Thanks for any suggestions.
 
Old 08-03-2013, 11:25 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by rcmonroig View Post
should the mode 701 on directory info allow me to list it as long as I name it specifically and use the -ld option?
The parent directory /home/max should prohibit access by others as it has 0700 access rights.


Quote:
Originally Posted by rcmonroig View Post
Running Fedora 14
Should really be 18 or 19, not any earlier version.
 
Old 08-03-2013, 11:26 AM   #3
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
If you also have execute permission on all the higher level directories, then your ls -ld command will list the /home/max/info directory. If you lack execute on /home or /home/max, then the ls command will fail, even if you have execute permission on the info directory.
 
Old 08-03-2013, 11:34 AM   #4
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by rcmonroig View Post
I log in as max
mkdir info
chmod 701 ./info
ls -l gives me
drwx --- --x max pubs info
what's the point of allowing max's group mates nothing at all, and grant "others" the right to enter the new directory, but neither read (i.e. list its contents) nor write to it? I think 701 is a very strange pattern, and it doesn't make sense to me.

Quote:
Originally Posted by rcmonroig View Post
I login as zach and run

ls -ld /home/max/info
I should get:

drwx --- --x max pubs /home/max/info

but I get permission denied
Is zach a member of group pubs, too? If so, he doesn't have permission to access the directory in any way. Besides, I think he must also have the permission to enter (execute) /home/max to access another directory below that level.

Quote:
Originally Posted by rcmonroig View Post
should the mode 701 on directory info allow me to list it as long as I name it specifically and use the -ld option?
No. To browse a directory (list its contents), you must have 'r' permission on it. You only gave 'x' permission, which means zach might be able to access a file inside /home/max/info directly via its name - assuming the permissions on the higher levels allow this.

I don't know what you intend by these strange things. But if max and zach should work together on a project and have shared access to a common directory, I'd rather create a group for the project, make both users a member of the group, then make the shared directory belong to this group und grant the group members all necessary rights.

[X] Doc CPU

Last edited by Doc CPU; 08-03-2013 at 11:36 AM.
 
Old 08-03-2013, 11:40 AM   #5
rcmonroig
Member
 
Registered: Mar 2007
Location: Chandler, AZ
Distribution: Fedora 10,12,and 14
Posts: 62

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Smile Directory permissions

Yes! Thank you Z038 very much that was the oversight. The parent directories all need to be 701. I really appreciate your help.

Last edited by rcmonroig; 08-03-2013 at 11:42 AM. Reason: recognize contributor
 
Old 08-03-2013, 03:55 PM   #6
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
You're quite welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions Issue: directory+ subdirectory r/w etc access for current user? ChiggyDada Linux - Newbie 1 01-28-2013 06:48 AM
Permissions: giving specific groups write access to a directory kinetik Linux - General 3 07-06-2006 08:30 AM
ftp permissions access only in the one directory ataucuc Linux - Newbie 1 12-29-2005 10:53 AM
ftp permissions access only in the one directory ataucuc Linux - Newbie 1 12-27-2005 04:29 PM
Permissions, File, Directory access tHcnunz Linux - Newbie 3 03-26-2004 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration