shams Posted February 21, 2019 Share Posted February 21, 2019 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 Link to comment Share on other sites More sharing options...
gw1500se Posted February 21, 2019 Share Posted February 21, 2019 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.