Jump to content

Archived

This topic is now archived and is closed to further replies.

miloafg

php permission denied

Recommended Posts

  • Warning: include_once(/var/www/html/scripts/klassementscript.php): failed to open stream: Permission denied in /var/www/html/klassement.php on line 90

     

    Warning: include_once(): Failed opening 'scripts/klassementscript.php' for inclusion (include_path='.') in /var/www/html/klassement.php on line 90

 

 

 

 

 

can anyone help me with this?

 

Share this post


Link to post
Share on other sites

the php user account on the server does not have read/execute permission for either those files or their containing folder.  Just fix the permissions and you should be good to go.

Share this post


Link to post
Share on other sites

 

the php user account on the server does not have read/execute permission for either those files or their containing folder.  Just fix the permissions and you should be good to go.

Well, I have the same problem :)

[newuser@centos-box ~]$ whoami
newuser

[newuser@centos-box ~]$ touch file.php

[newuser@centos-box ~]$ ls -l file.php 
-rwxrwxr-x. 1 newuser newuser 0 Jun 16 07:55 file.php

[newuser@centos-box ~]$ ./file.php 
bash: Permission denied

Share this post


Link to post
Share on other sites

I haven't run php direct from the console before, so we're well out my comfort zone, does it run under the logged in user or does it still need the php user account to launch? I'm hoping the latter as that at least makes sense to why it would still be denied. even though you are allowed to execute the script, php itself is not...that's what I'm thinking anyway.

Share this post


Link to post
Share on other sites

×
×
  • 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.