TheTwister
Posts: 18
Joined: Fri Dec 29, 2017 6:39 pm

Error Saving FIle

Sat Jan 12, 2019 12:24 pm

I keep getting this error every time i save a new file (see attached)
Hope can i make it so i dont keep seeing this?
Attachments
permission.PNG
permission.PNG (30.58 KiB) Viewed 3640 times

User avatar
jahboater
Posts: 6819
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Error Saving FIle

Sat Jan 12, 2019 12:50 pm

Please read the error message carefully.
It says "permission denied" which is usually enough.

Please see this recent thread on the same topic:-
viewtopic.php?f=91&t=58451
which might help.

TheTwister
Posts: 18
Joined: Fri Dec 29, 2017 6:39 pm

Re: Error Saving FIle

Sat Jan 12, 2019 4:37 pm

Thank you for that, so is there no way to make it so you dont have to do it to every folder path?

User avatar
jahboater
Posts: 6819
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Error Saving FIle

Sat Jan 12, 2019 4:42 pm

TheTwister wrote:
Sat Jan 12, 2019 4:37 pm
Thank you for that, so is there no way to make it so you dont have to do it to every folder path?
Well you can, (chmod -R or chown -R see man chown and man chmod). However I think it is a dangerous and BAD idea.

Edit the file in your home directory, then when you want to publish it, do something like:-

sudo cp myfile.html /var/www/html

Sudo (man sudo) briefly gives you the extra permission to copy the file into the protected area.

TheTwister
Posts: 18
Joined: Fri Dec 29, 2017 6:39 pm

Re: Error Saving FIle

Sat Jan 12, 2019 4:50 pm

Okay thanks i will get that a go. I dont have much knowledge in command line. Do you know any useful tutorials for beginners?

Andyroo

Re: Error Saving FIle

Sat Jan 12, 2019 6:36 pm

For introductions to the command line have a look at https://www.edx.org or the RPF book https://www.raspberrypi.org/blog/learn- ... the-magpi/. (Free as a pdf or pay for the book and help support the foundation).

The other way to sort your file copy problem is to add your user (I assume Pi) to the www-data group using

Code: Select all

sudo usermod -a -G www-data pi
This is safer than changing the security of the files / folders esp if you are putting the site on the public internet - if so have a look at the security docs here https://www.raspberrypi.org/documentati ... ecurity.md. notes these do not cover web site security as that’s a different game :roll:

Return to “Troubleshooting”