<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.10.3">
</HEAD>
<BODY>
On Sun, 2006-06-08 at 00:10 -0400, Gregory Piñero wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">It's a python file and I tried running these two commands and get the</FONT>
<FONT COLOR="#000000">following errors:</FONT>

<FONT COLOR="#000000">$ python backup_all.py >> log.txt</FONT>
<FONT COLOR="#000000">python: can't open file</FONT>
<FONT COLOR="#000000">'/home/chiefinnovator/backups_all_web/backup_all.py': [Errno 13]</FONT>
<FONT COLOR="#000000">Permission denied</FONT>

<FONT COLOR="#000000">$ backup_all.py >> log.txt</FONT>
<FONT COLOR="#000000">python: can't open file</FONT>
<FONT COLOR="#000000">'/home/chiefinnovator/backups_all_web/backup_all.py': [Errno 13]</FONT>
<FONT COLOR="#000000">Permission denied</FONT>

<FONT COLOR="#000000">Since this file has passwords in it, I wanted to make it execute-only.</FONT>
<FONT COLOR="#000000"> Is that not possible?  I also set the owner to root if that matters.</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
The problem is, I think, that the interpreter itself has to open and read in the files to execute them.  Executing a proper binary is done at the OS level itself in the binary loader, so it doesn't require a process to open a file, read it, etc.<BR>
<BR>
So these Python scripts?  Have to be readable.  If you don't want them readable, you should do something like compile them to bytecode and make those files readable (after stripping all doc strings, etc.) which still won't quite do what you want, but will be better than what you've got.<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<B>Michael T. Richter</B><BR>
<I><FONT SIZE="2">Email:</FONT></I><FONT SIZE="2"> ttmrichter@gmail.com, mtr1966@hotpop.com</FONT><BR>
<I><FONT SIZE="2">MSN:</FONT></I><FONT SIZE="2"> ttmrichter@hotmail.com, mtr1966@hotmail.com; </FONT><I><FONT SIZE="2">YIM:</FONT></I><FONT SIZE="2"> michael_richter_1966; </FONT><I><FONT SIZE="2">AIM:</FONT></I><FONT SIZE="2"> YanJiahua1966; </FONT><I><FONT SIZE="2">ICQ:</FONT></I><FONT SIZE="2"> 241960658; </FONT><I><FONT SIZE="2">Jabber:</FONT></I><FONT SIZE="2"> mtr1966@jabber.cn</FONT><BR>
<BR>
<I><FONT SIZE="1">"I would not flinch from sacrificing a million lives for India's liberty!"</FONT></I><FONT SIZE="1"> </FONT><B><FONT SIZE="1">--Mahatma Gandhi</FONT></B>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>