Read and Execute Permissions of a directory

Read and Execute Permissions of a directory

Post by Jame » Wed, 18 Sep 2002 23:24:48



What is the difference between read and search  permission bits for a directory.

I think to search u need to read the directory am i correct ?.

Pl Clarify,

Thanks,
James

 
 
 

Read and Execute Permissions of a directory

Post by Moshe Jacobso » Wed, 18 Sep 2002 23:37:13


James had nothing better to do than to say:

Quote:> What is the difference between read and search  permission bits for a directory.

The read permission on a directory allows listing of its contents. The
execute permission allows for entry into the directory. Watch the
following string of commands:











readonly/file1 readonly/file2 readonly/file3

exonly/*



bash: cd: readonly: Permission denied

Moshe
--
*** SPAM BLOCK: Remove bra before replying! ***
Moshe Jacobson :: http://runslinux.net :: moshe at runslinux dot net
!! FBI Arreseting Programmers?  http://www.freesklyarov.org
!! Trust Microsoft Anti-Trust:  http://www.anti-dmca.org

 
 
 

Read and Execute Permissions of a directory

Post by Barry Margoli » Thu, 19 Sep 2002 02:58:07




Quote:>execute permission allows for entry into the directory.

While this is true, it's not a very complete answer.  It also allows access
to the files named in the directory.

tools:~#2407% mkdir readonly
tools:~#2408% echo foo > readonly/test.file
tools:~#2409% cat readonly/test.file
foo
tools:~#2410% chmod 444 readonly
tools:~#2411% cat readonly/test.file
cat: cannot open readonly/test.file
tools:~#2412% ls -l readonly/test.file
ls: readonly/test.file: Permission denied
tools:~#2414% /bin/ls -f readonly
.          ..         test.file

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. Is it possible to have execute permissions without read permissions?

Does anyone know if it is possible to give a user execute permissions on a
file, but not to let them read what is contained within that file?

The case in question is a script with contains some sensitive data
(password) is required to be run by another user, but I don't want them to
see the text in the file. I have searched for information, but only seem to
have turned up details about directories which can be changed to but the
contents cannot be read.

I have tried suid but it still doesn't seem to work.

Any suggestions would be gratefully accepted.

Cheers,

Iain.

2. How do I get sound in Redhat 5.2 ?

3. Question regarding the write (w) and execute (x) permissions as they apply to directories

4. Backup utilities other than tar and system backup?

5. executing scripts without read permission

6. ntfs

7. Read a file with only execute permission?

8. Mounting a dos disk within LINUX

9. NFS read/execute permission

10. Finding if read/write/execute permissions

11. How to create a file with read, write, and execute permissions?

12. Hash table of commands & directory read permission