os.chdir OSError(13, 'Permission denied') for ampps

540 views Asked by At

I am calling python script script.py through php script index.php by following command:

$tmp = exec("python script.py xyz");

Now, in python script script.py, I am trying to change the directory, which is symlink of folder:

try:
    os.chdir('softlink')
except:
    var = sys.exc_info()
    print var

Below error is coming while executing

<type 'exceptions.OSError'>, OSError(13, 'Permission denied'), <traceback object at >

I changed permissions for softlink, script.py and index.html according to similar question OSError - Errno 13 Permission denied , which are:

ls -la 
-rwxrwxrwx  1 ampps    ampps 1819 Nov  8 21:08 index.php
-rwxrwxrwx  1 ampps    ampps 4391 Nov  8 21:15 script.py
lrwxrwxrwx  1 ampps    ampps   39 Nov  8 20:14 softlink -> 
/local/mnt/workspace/manifest/

I am not getting what else permission the folder or symlink requires, so that ampps server can access the folder. Thanks

0

There are 0 answers