[urgent] Can't upload files. Access Denied.
Hello guys,
I am having a problem with my fresh RedHat installation. I have configured PHP, Apache, MySQL, etc. My web applications run fine. The only problem is: whenever I try to upload a file as an attachments in any of my web applications, it gives me a PHP error: access denied. I already went extreme and granted 777 permissions on my /var/www/html directory. I have as well made apache:apache owner of that folder. I don't know what else to do. So current situation is: apache:apache is owner of the directory permissions are set as drwxrwxrwx (777) I still can not upload any attachments to that directory Please help. |
Apache usually runs as nobody.
When you do a 'ps aufx' who owns the running httpd processes? If it is running as nobody you can change this in httpd.conf |
Code:
apache 32709 0.0 0.4 39372 19092 ? S 10:04 0:00 \_ /usr/sbin/httpd |
It may very un-likely, but I have to ask just to eliminate the possibility, the directory to which you're trying to upload, is it NFS mounted, or accessed through a symbolic link?
Another possibility is an access restriction that's imposed by Apache's functionality based on the way it's configured. But to get a better idea of the context in which youre' working, are you working with Apache 1 or 2? Is /var/www/html your doc root, and are you trying to upload to that? |
It's Apache 2
/var/www/html is the home dir and I am uploading to that that directory is on local internal hard drive, not on some shared storage (if I got you correct) |
I meant doc root by home dir...
|
Could we see the PHP code snippet which is generating the actual error?
|
Code:
Warning: mkdir() [function.mkdir]: Permission denied in /var/www/html/careers.amsi.ae/incs/functions.php on line 32 |
Interesting error msgs, but we still want to see the php code...
|
All times are GMT -5. The time now is 04:58 AM. |