Jump to content

Recommended Posts

I have a test server which is running SUSE9.2, Apache2+php4. Whenever I upload a file to the www directory and attempt to open it in a browser I receive the following error message:

 

PHP Warning:  Unknown(/www/test.php): failed to open stream: Permission denied in Unknown on line 0

PHP Warning:  (null)(): Failed opening '/www/test.php' for inclusion (include_path='.:') in Unknown on line 0

 

Now if I chmod a+rx /www/test.php the file runs ok, no error messages. I should note I have to chmod ALL files including any new images, videos, .html files, etc. otherwise apache will not display the file in the browser, example attempting to display a .htm file brings up a HTTP Error 403 - Forbidden error.

 

Is their a setting or directive in php.ini or apache's httpd.conf that I can set so that I do not have to chmod a+rx all new files?

Link to comment
https://forums.phpfreaks.com/topic/68707-question-about-apachephp-file-chmod/
Share on other sites

Ah, I see what you mean... Yes that would be one possible solution and maybe the only solution if I cannot figure this thing out.

 

Is their any <Directory> settings in apache .conf which would control what files apache can serve without these permissions?

 

Here is the error log report from apache:

[Mon Sep 10 07:17:52 2007] [error] [client 192.168.1.5] (13)Permission denied: file permissions deny server access: /www/file.html

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.