Lamp is installed on my home machine and will never be for public viewing. I'm learning to program.
When I code in Notepadqq and try to save the file var/www/html/
I get permission denied
. So, I used this command in terminal:
sudo chmod 766 -R /var/www/html
In the example I was copying, this command was given:
sudo chown pi /var/www/html
I got this from terminal in response.
chown: invalid user: ‘pi’
I then realised pi was not my name, so I then tried
sudo chown Bobby /var/www/html
as Bobby is my name. But I still got
chown: invalid user: ‘Bobby’
So I tried this
sudo chmod 766 -r /var/www/html
as per the example. But I got
chmod: cannot access '766': No such file or directory
Eish.
All I would like to do is to be able save the programming I am learning in that file so I can load it through the apache server which is up and running.
Help please
@
symbol. You can also typewhoami
to see your username.echo $USER
should also work. Be careful withchown
andchmod
as you can trash your system pretty comprehensively with a minor typo when using them. Also be aware that directories need execute permission to be entered, and giving write permission to "others" is a security risk, so 766 is not generally a useful mode – Zanna Mar 19 '18 at 21:21