I've hit a bit of a problem with a set of php scripts I'm working on. At one point, I need the script to do some file manipulation - mkdir, write to a file, and rm. The problem is that the directory is owned by a different user than the web server user, so I run into a permission denied problem.
I don't want to give the web server direct permission to the files (we're on a shared server), so changing the owner/group isn't a possibility. Can I run the php script SUID as the proper user?