0
While trying to run a php code on my Ubuntu machine
if ( ! is_dir($system_path))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
exit(3); // EXIT_CONFIG
}
He is showing error:
I realize it may be permission error my machine, I have tried following this tutorial: http://fideloper.com/user-group-permissions-chmod-apache
But when executing second command: $ chmod go+x /var/www
my Ubuntu presents the following error message:
chmod: alterando permissões de “/var/www”: Operação não permitida
Any hint of what might be?
You have already given read permission to all group directories
www-data
:sudo chown www-data:www-data -R *
. And then he added his user to the root.www-data group something likesudo chown seu_user.www-data
?– Ivan Ferrer
to modify system directory permissions you must execute the command as root, utilize
sudo chmod ...
– Pedro Sanção
@Ivanferrer My user was already in the www-data group, but had not yet run the command to give read permission to all directories of the www-data group. Even running now, it didn’t solve.
– Raphael Cortes
@Sanction, yes I already execute the commands with sudo... thanks
– Raphael Cortes
With
print_r($system_path); die();
what appears on the page?– Ivan Ferrer
tried: 'sudo chmod 775 -R /var/www' ? to change permissions you must enter sudo
– Ivan Ferrer
Do
sudo chmod 0755 /var/www
, must be sufficient.– Edilson