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-04-2009, 02: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 02:18 AM.
 
Old 08-04-2009, 03:02 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
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 03:05 AM.
 
  


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

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

All times are GMT -5. The time now is 05:16 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