Restoring access rights for /home/pi

Accidently, I recursively destroyed access rights for /home/pi.
Since /home/pi/data is also affected MySQL stopped working.
I recovered functionaly by granting everyone full access (777) to /hoem/pi/data,
but I’m wondering what are correct settings.
Is there a description somewhere which access right are needed?

my /home/pi/data directory looks like it is 777 also.

[email protected](ro):~$ ls -al
total 263
drwxr-xr-x 20 pi   pi    4096 May  7 21:37 .
drwxr-xr-x  3 root root  4096 Nov 21  2015 ..
drwx------  2 pi   pi    4096 Nov 15  2016 .aptitude
drwxr-xr-x  3 pi   pi    4096 Mar 16  2016 avrdude-rpi
drwxr-xr-x  4 pi   pi    4096 Mar 26 14:05 backup
-rw-r--r--  1 pi   pi   70919 Nov  7  2016 backup_php.ini
-rw-------  1 pi   pi    9300 May  7 22:09 .bash_history
-rw-r--r--  1 pi   pi     220 Nov 21  2015 .bash_logout
-rw-r--r--  1 pi   pi    3618 Nov 10  2016 .bashrc
drwxrwxrwx 11 pi   pi    3072 May 15 11:21 data
drwxr-xr-x  7 pi   pi    4096 Mar 26 11:00 emonhub
drwxr-xr-x 10 pi   pi    4096 May  7 21:37 emonpi
drwxr-xr-x  6 pi   pi    4096 Oct 31  2016 emonupload
drwxr-xr-x  3 pi   pi    4096 May 15 11:36 huawei-hilink-status
-rw-------  1 pi   pi     696 Mar 24  2016 .mysql_history
-rw-------  1 pi   pi      31 Feb 27 16:57 .nano_history

@glyn.hudson might be able to tell you where it is documented.

Your best option would be to download a fresh emonSD, flash it to an SD card then use this as a template guide for restoring your image: