Messed up permissions for Nextcloud 12.3

Status
Not open for further replies.

Jockotomen

Cadet
Joined
Dec 27, 2017
Messages
7
Hi Guys!

Now I really messed up. I was sitting fiddling with permissions (in the freenas UI) on my volume containing both the jail, files and db folders for my nextcloud installation.

I accidentally wrote permission root/wheel 770 on the whole volume where the nextcloud folders is, recursively.

Now, of course, I get 403 error (permission denied) when trying to access anything in the nextcloud html directory from a browser. Not sure but probably there are more permission troubles beneath the surface.

Anyone that has some idea what the best approach would be here?

Any help most appreciated!

BTW. I did follow this guide to install Nextcloud 12.3: https://forums.freenas.org/index.ph...reenas-11-with-all-checks-passed.58634/page-3
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
If you changed the permissions to nobody:staff 777 recursively it seems like you should be able to get back in.

This should effectively remove all limits to access on the files.
 

Jockotomen

Cadet
Joined
Dec 27, 2017
Messages
7
httpd-error.log shows a lot like this:

[Fri Dec 29 09:52:59.717968 2017] [:error] [pid 13118] [client 192.168.2.40:51698] PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused in /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php:61\nStack trace:\n#0 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\\DB\\Connection->connect()\n#1 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()\n#2 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\\DBAL\\Connection->getDatabasePlatform()\n#4 /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php(148): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#5 /usr/local/www/apache24/data/nextcloud/3rdparty/doctrine/ in /usr/local/www/apache24/data/nextcloud/lib/private/DB/Connection.php on line 61
 

LotLits

Dabbler
Joined
Apr 10, 2015
Messages
30
@Jockotomen It sounds like your database isn't starting. My db folder is owned by user/group 88 which is the mysql user/group within the jail. You could try changing permissions of the DB directory to your mysql user/group within the jail, and starting mysqld (or restarting the jail) with
Code:
service mysql-server restart
.

This is just a guess though.
 

Jockotomen

Cadet
Joined
Dec 27, 2017
Messages
7
That is correct. Mysql is not starting. I changed the owner of the db-folder before. It is owned by mysql:mysql.

Still:

Code:
service mysql-server start


gives me the following result

Code:
Starting mysql.
login class 'daemon' non-existent, using default
su: pam_start: system error
/usr/local/etc/rc.d/mysql-server: WARNING: failed to start mysql
 
Status
Not open for further replies.
Top