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?

Kulfy
  • 17,696

1 Answers1

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
    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 '20 at 13:26