php permissions
Posted: Wed Sep 21, 2011 3:53 pm
Hey all,
I'm having a bit of a problem trying to set up a custom php script.
Here's what's going on:
I have an upload script that allows registered users to upload files to a temp /upload/ directory.
Upon review from admins the jpegs need to be copied to another folder.
At first I had a problem with open_basedir restrictions but after fixing that with a vhost.conf file I was able to bypass that.
My real issue now is not so much about php itself but rather related to linux permissions.
I get a permission denied when trying to copy the files and it's my understanding that apache/php does not have permission to write to the destination folder.
In theory I think I know what needs to be done I just don't have the linux skills to do this, so any help is greatly appreciated.
Here's what I'm thinking.
I need to give php write permission to the destination folder.
How can I tell which user is php?
How do I assign the permissions? chmod? Do I need to chown the directory as well?
Do I need to log in as root or can it be done through the admin account?
Lastly I need the domain admin account to be able to see those copied files via FTP. Do I need to chown the admin group as well?
Please be as detailed as possible. I'm a big noob but willing to learn fast
c
I'm having a bit of a problem trying to set up a custom php script.
Here's what's going on:
I have an upload script that allows registered users to upload files to a temp /upload/ directory.
Upon review from admins the jpegs need to be copied to another folder.
At first I had a problem with open_basedir restrictions but after fixing that with a vhost.conf file I was able to bypass that.
My real issue now is not so much about php itself but rather related to linux permissions.
I get a permission denied when trying to copy the files and it's my understanding that apache/php does not have permission to write to the destination folder.
In theory I think I know what needs to be done I just don't have the linux skills to do this, so any help is greatly appreciated.
Here's what I'm thinking.
I need to give php write permission to the destination folder.
How can I tell which user is php?
How do I assign the permissions? chmod? Do I need to chown the directory as well?
Do I need to log in as root or can it be done through the admin account?
Lastly I need the domain admin account to be able to see those copied files via FTP. Do I need to chown the admin group as well?
Please be as detailed as possible. I'm a big noob but willing to learn fast
c