I'm trying to carry out a python script from php web page. The python script uses netsnmp module which drenched the next error in httpd error_log:


Traceback (newest call last):

File "/var/www/html/backendscripts/updateMachine.py", line 5, in

    import netsnmp

.

.

.

The next error happened while attempting to extract file(s) towards the Python egg

cache:

  [Errno 13] Permission refused: '**/var/www/.python-eggs/netsnmp_python-1.0a1-py2.5-linux-i686.egg-tmp'**

The Python egg cache directory is presently set to:

  /var/www/.python-eggs

Possibly your bank account doesn't have write use of ezinearticles?  You are able to

alter the cache directory by setting the PYTHON_EGG_CACHE atmosphere

variable to suggest for an accessible directory.

The python egg cache is situated in /root/.python-eggs/ directory. I've also produced a soft link in /var/www/ directory pointing to egg cache directory with full permissions to any or all customers.

/var/www/.python-eggs -> /root/.python-eggs


[root@localhost .python-eggs]# pwd

/var/www/.python-eggs

[root@localhost .python-eggs]# ls -lR .

.:

total 4

drwxrwxrwx 3 root root 4096 2011-10-07 02:17 netsnmp_python-1.0a1-py2.5-linux-i686.egg-tmp

./netsnmp_python-1.0a1-py2.5-linux-i686.egg-tmp:

total 4

drwxrwxrwx 2 root root 4096 2010-06-09 22:21 netsnmp

./netsnmp_python-1.0a1-py2.5-linux-i686.egg-tmp/netsnmp:

total 84

-rwxrwxrwx 1 root root 81349 2010-06-09 22:20 client_intf.so

 

I've even set PYTHON_EGG_CACHE atmosphere variable within the python script as:

import os

os.environ['PYTHON_EGG_CACHE'] = '/var/www/.python-eggs/'**

but nonetheless the script does not execute.