Jump to content

php permission denied


Go to solution Solved by Muddy_Funster,

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?

 

Link to comment
https://forums.phpfreaks.com/topic/296852-php-permission-denied/
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

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.

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.