This question already has an answer here:
I'm new to both Ubuntu and PHP. I have an Ubuntu 18.04 virtual machine with PHP. I've successfully installed php, and been able to make and run some basic php programs in the command line terminal, and saving them in the directory /var/www/html.
Now that I would like to up the complexity of the programs, and start looking at integrating some html, it would be helpful to use a text editor such as atom. When I've tried, I can open the files and make changes, but am not allowed to save them or move them into the folder after modification. How can I change my settings, permissions or something else in order to let me use text editors for php coding?