Jump to content

Recommended Posts

In ubuntu 18.10 ,  i created a folder name db in the external usb hard dirve changed the ownership to the www-data the apache2 server and set the permissions to 777 , i run this php code and get the permission error:

<php
 chdir('/media/user/e46cafba-2656-4e42-b1c9-6417f28839df/db/');
 system('./rs');
?>    

but the php code cannot change to the dir and get the error:

[21-Feb-2019 10:43:26 UTC] PHP Warning:  chdir(): Permission denied (errno 13) in /home/user/www/html/rse4db.php on line 5

 

First using 777 is very dangerous so you really don't want those permissions. Second, just because the directory 'db' has those permissions, it does not mean the upper level directories have the correct ownership or permissions. You have to look at each level.

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.