Jump to content
Sign in to follow this  
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

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.

Sign in to follow this  

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