[HPADM] Execute a program without read permissions

From: bill.thompson@goodyear.com
Date: Fri Mar 03 2006 - 11:49:21 EST


All,

If a file has only the execute bit set for world, can it be run?

e.g.: -rwxr-x--x bin bin foobar

The file foobar can be read/written/executed by the user "bin" and it can be read and executed by anyone in the "bin" directory. But
what about the rest of the world?

If foobar is a script I know for sure it cannot be run because the system must parse the contents of the file. If it cannot read the
file, it cannot parse it.

But what if foobar is a binary?

It was always my understanding that if you could not read a file, you could not execute it (e.g. - you have to be able to read the
file into memory for it to run). But, I did some experimenting and I'm no longer sure that's the case.

Does anybody know for sure why/if this works?
                                                                                                                                       
 Bill Thompson
 Sr UNIX Systems Administrator
 The Goodyear Tire & Rubber Company
                                                                                                                                       
                                                                                                                                       
                                                                                                                                       

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:52 EDT