Permission Denied

Jorge Godoy jgodoy at gmail.com
Sun Aug 20 09:35:31 EDT 2006


Stargaming <stargaming at gmail.com> writes:

> In the most cases, PATH is preconfigured to include "." (. is the current
> directory as .. is the parent one). You can use ./yourpythonscript in this
> case.

I most cases on Unix boxes it isn't configured to include ".".  This is so for
safety reasons (somebody might replace some command with a tampered binary or
a script and capture information that they shouldn't have access to...). 

The solution of creating a directory and adding it to PATH is the best one,
IMHO.  Having a "~/bin" is also common for Linux and some distributions of it
already ship with it in /etc/skel and in the PATH, so just put a link there or
copy your scripts there. 

> The most "advanced" way would be expanding PATH with
> /home/youraccount/python/learning (use PATH=$PATH:/path/here..).

Yes.  This is the best.

> Choose the one you're most comfortable with. :-)

;-)  And think about security as well. 

-- 
Jorge Godoy      <jgodoy at gmail.com>



More information about the Python-list mailing list