0

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

Zanna
  • 70,465
Bobby
  • 31
  • The last error seems unlikely. Are you sure you ran exactly that command? Your username is probably all lowercase - look at your prompt in the terminal - your username will probably appear at the beginning before the @ symbol. You can also type whoami to see your username. echo $USER should also work. Be careful with chown and chmod 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

1 Answers1

0

You can run the file manager in super user mode by the following command in terminal gksudo nautilus

or please follow instruction from here. https://askubuntu.com/a/55365/546041

Thank You

smehsan
  • 748