LinuxQuestions.org
Help answer threads with 0 replies.
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-04-2009, 03:13 AM   #1
laki47
Member
 
Registered: Feb 2009
Posts: 33

Rep: Reputation: 15
Directory permssions - question


Hi!

I have a question regarding directory permissions. In home temp directory I put txt.txt file.

root@machine1:/home/jsmith # ls -ld temp
drw-r--r-- 2 jsmith users 96 Aug 4 09:16 temp

Notice that I DO NOT have execute permissions on temp. But I have read permissions.

Question:
Why can't I do ls -l temp with jsmith? I have read permission but seems that it doesn't work without execute permission.

It will be:

root@machine1:/home/jsmith # ls -l temp
temp/txt.txt not found
total 0

Thanks

Last edited by laki47; 08-04-2009 at 03:18 AM.
 
Old 08-04-2009, 04:02 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
This is a convention on Unix and Unix-like systems. The 'r' permission bit on a directory allows for files within the directory to be accessed by name. But the directory can only be 'searched' (eg by ls) if the 'x' permission is enabled.

There is a short summary in the wikipedia article on file permissions.

Last edited by neonsignal; 08-04-2009 at 04:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
directory question the_pheonix Linux - Newbie 9 11-12-2006 09:01 PM
Arbitrary change of folder permssions apostate Mandriva 1 11-18-2005 01:34 AM
Mounting usb pen drive file permssions problems linuxmandrake Debian 1 10-10-2005 08:21 PM
Directory question ProtoformX Linux - Security 2 06-07-2004 03:32 PM
permssions just ' screwed up ' xconspirisist Linux - Software 2 09-07-2003 04:12 PM


All times are GMT -5. The time now is 10:46 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration