problem "solved"? after backtracking where the permission first stops, the permission denial suddenly went away for no reason.
I am building a webpage where the user must have the possibility to send an input choosing certain predefined names in a local database. (the user-input is either a html form or imported .txt file)
From php i want to be able to call python scripts that further gets other information from the db. With that information i need to be able to create files that is going to be sent back to the user
how can i make my script calls without opening security holes to the user, how do i configure my apache?
i use apache 2.2.3 as webserver
Right now i have problems with permissions from apache when i try to write to a file from my python script? Permission to write is denied even if i give script, textfile and directories full permission (777) apache itself must have some security config that disallow the web user to write?
Traceback (most recent call last): File "python/pythonscript.py", line 6, in ? f = open("/var/www/(path)/textfile.txt", "w") IOError: [Errno 13] Permission denied: '/var/www/(path)/textfile.txt'
Can i configure my webserver to allow scripts to read and write to files locally but not allowing the web users to have that power? If so what is the most secure way to do it?