OK, I've fixed it, but I'm not sure why.  More about that later.

Replying to both Ralph and John:

===  Ralph ===
On Saturday, 18 February 2017 17:47:32 GMT Ralph Corderoy wrote:
> What's the user, group, and permissions on /var/www, e.g. `ls -ld
> /var/www'?

pi@raspberrypi:/var/www/html $ ls -ld
drwxr-xr-x 4 root root 4096 Feb 19 09:19 .
pi@raspberrypi:/var/www/html $ ls -la
total 20
drwxr-xr-x 4 root root 4096 Feb 19 09:19 .
drwxr-xr-x 3 root root 4096 Aug 10  2016 ..
drwxr-xr-x 2 root root 4096 Aug 18  2016 Guide
-rw-r--r-- 1 root root  867 Feb 19 09:19 index.html
drwxr-xr-x 2 root root 4096 Aug 18  2016 Quiz

These permissions are identical for the Pi 2 running the SD Card that worked 
in August and the Pi 3 running the latest Raspbian.  (Except, this gave me the 
clue, because the directory names were different on the two devices).

===  John  ==
On Saturday, 18 February 2017 18:00:25 GMT John Carlyle-Clarke wrote:
> Hi Terry. It's probably file permissions. Check what user the nginx server
> runs as, and make sure they have access to the files. They will need rx
> permission at least to every directory down to them from / as well, I
> believe.
> 
> To check, switch to root then do:

Why do I need to switch to root ?  The command below is prefixed with sudo.

>  sudo -i -u nginx
> 
> (Replace nginx with the actual user name)

The user is root.  Is that normal?

> Then make sure you can read one of the files.

Well the command put me into the root home directory, so I wasn't sure what 
this was doing.

===  The solution  ===

When I spotted that the the directory names were different on the two devices, 
I tried surfing to the correct one on the Pi 2; this worked (I had forgotten 
that I changed them when I moved to the Pi.  I then changed the directory 
names on the Pi 3 to match the Pi 2 and everything worked.

My recollection is that I only changed those names on the Pi (compared to the 
version on my server), to make typing easier, but clearly having the Directory 
names as Audio_Guide and Kiddies_Quiz instead of Guide and Quiz was what was 
needed.

Why would that be?

-- 



                Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-03-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:[email protected] / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to