Hello!
Since some time I can’t open my nextcloud server in the browser anymore. The server was running on my Omnia since years and I found out that Kodi, which different installations on some computers use mysql databases and files at the Omnia, stopped working as well. All those installations have their data on a harddrive which is permanently mounted to /srv.
I found out when I checked why I couldn’t change some files names on NFS shares from /srv automounted on my KDE notebook, something I use since years, too. The owners/groups of some folders and files have been root:root, which doesn’t give permissions to my normal user on my notebook. I changed all permissions in /srv with
chown -r marwell:www-data /srv
Renaming files works now.
I thought my nextcloud problem would be something similar and checked the permissions. I hadn’t realized the the nextcloud folder is inside /srv/www. I had changed all owners:groups to marwell:www-data. That is wrong for sure … However, the problem with nextcloud was there before I changed the permissions.
Searching which owner:group nextcloud data files on Turris Omnia should have I didn’t find clear information.
Later I found out that mysql doesn’t start. If I try to enter mysql I get an error:
root@turris:/# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysql.sock’ (2)`
Trying to restart the service shows mistakes, too.
root@turris:/# mysqld restart
[Warning] option ‘table_open_cache’: unsigned value 4 adjusted to 10
[Note] mysqld (mysqld 10.2.18-MariaDB) starting as process 27161 …
mysqld: Please consult the Knowledge Base to find out how to run mysqld as root!
[ERROR] Aborting
Actually changing all the owners/groups was a mistake anyway, because my Kodi files and databases are inside this folder, too. They shouldn’t have been changed.
But at the moment the problem with mariadb is more important I think. I’ve found some information that the sock-file is made on runtime by mariadb, but why it’s not there and I get the mentioned error message I don’t understand.
/var/run is root:root 0777. This place is configured in the mariadb configuration, too. (Actually it’s linked to /tmp/run)
To be honest, my knowledge is restricted, about the structure of Turris Os (here 3.11.16), databases, their permission handling, what mariadb needs to run and more. As well Nextcloud is not easy to understand for me, even if I use it since many years and as if I am using linux since 2007. So any help explaining the basic structure of the problem is very welcome!
Thank You in advance!