Rasp Pi configuration - Answered

I couldn't get the 'Ready to go' SD card image to boot, so have gone for the full installation method as detailed here.

Most of the installation went well except when I got to Section 9 where I found that whenever I try to make a copy of default.settings.php I get;

pi@raspberrypi ~ $ cd /var/www/emoncms/
pi@raspberrypi /var/www/emoncms $ cp default.settings.php settings.php
cp: cannot create regular file `settings.php': Permission denied

I can load  $ nano default.settings.php OK, but cannot create settings.php

I don't know why permission is denied. Any ideas?

////UPDATE////

After some digging and some help from Robert Wall, found the following to work;

$ sudo cp default.settings.php settings.php

Now sorted!

Jérôme's picture

Re: Rasp Pi configuration - Answered

You shouldn't have to use sudo for that.

In the emoncms installation guide, step 7, it says

Set the permissions of the www directory to be owned by the pi username:

$ sudo chown pi www

Then as long as you're connected as user pi, every file in emoncms should be owned by pi.

Apparently, it is not the case on your installation.

You can make all emoncms files owned by user pi / group pi by issuing following command :

sudo chown -R pi:pi /var/www/emoncms

Then you won't have to use administrator privileges (sudo) to modify your files.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.