I have a python script running as www-data
but I would like it to have separate r/w/e
permissions to the rest of the scripts. So I created a user to use however can't get the script to run as that user (it's a cgi
script and I want all but this one running as www-data
). Is there anyway I can use os.setuid()
to demote myself to this user?. It seems to work the other way around but not from www-data
to new user
Asked
Active
Viewed 164 times
0

Joseph Walden
- 11
- 1
-
can you use `chmod` to modify this specific script permissions? – Sufiyan Ghori Apr 30 '18 at 23:15
-
@SufiyanGhori yes. I tried setting the setuid bit however apparently I would need to do it to the interpreter, not the script – Joseph Walden May 01 '18 at 06:31