0

When I try to save the file of PHP in Ubuntu I get that error:

unable to save /var/www/html/script.php 
Error permission denied

How can I fix this error and save/run the PHP file?

0

1 Answer 1

0

the problem that I faced was in permissions so, I have to change the chmod of a directory which I working on so, in this case, I should write the following command:

$ sudo chmod  o+w /var/www/html

The o stands for other and the + adds the permissions w is write.

at this moment the mode of the whole directory will change from reading to writing mode

1
  • 1
    This is probably fine for local development, but should not be used in production - especially if the machine is shared by multiple (untrusted) users.
    – vidarlo
    Aug 16, 2020 at 13:26

Not the answer you're looking for? Browse other questions tagged .