I have a python (3.6 anaconda distribution) scrip on Centos 7 which at some point executes a simple query of the following structure
import MySQLdb cursor = cnn.cursor() # cnn is the open connection to MySQL db cursor.execute(strSQL) # cursor is the active cursor of cnn, # and strSQL is a simple SELECT query
The python script is being called from PhP (via exec) for data processing.
The cursor execute statement above throws the following error
Can't create/write to file '/tmp/MYC8vAAs' (Errcode: 13 - Permission denied)
All these programs work with no problems when called from the terminal window or locally on Ubuntu (VM on widows). I have very little expertise of system administration, but from what I've googled so far, all arrows are pointing to correct permission of /tmp folder (like here for example), but in my case the permissions are as follows
and I cannot think of any reason as why this is happening. Your insights on this would be most appreciated.