Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions Error on UnRAID Install #62

Closed
stephenmetzger opened this issue Jan 13, 2022 · 6 comments
Closed

Permissions Error on UnRAID Install #62

stephenmetzger opened this issue Jan 13, 2022 · 6 comments

Comments

@stephenmetzger
Copy link

stephenmetzger commented Jan 13, 2022

Hi,

After installing Baikal following your provided instructions, when trying to load the WebUI I get:

 The FOLDER containing the DB file is not writable, and it has to.
 Please give write permissions on folder '/var/www/baikal/Specific/db' 

I have the Specific folder mapped to my appdata directory, have run the UnRAID New Permissions tool, and (to test) have given 0777 permissions to the Specific folder within the appdata directory.

After install, there was no "db" folder in the Specific folder, so I went ahead and added one, which replaced the permissions error with:

 Exception: Fatal error: no connection to a database is available. in 
 /var/www/baikal/Core/Frameworks/Baikal/Core/Tools.php:71
 Stack trace:
 #0 /var/www/baikal/Core/Frameworks/Baikal/Framework.php(72): 
 Baikal\Core\Tools::assertBaikalIsOk()
 #1 /var/www/baikal/Core/Frameworks/BaikalAdmin/Framework.php(34): 
 Baikal\Framework::bootstrap()
 #2 /var/www/baikal/html/index.php(52): BaikalAdmin\Framework::bootstrap()
 #3 {main}

Wondering if it can be set up to use a mysql/mariadb database, and what the variables in the docker template would be.

Thanks!

@ckulka
Copy link
Owner

ckulka commented Jan 13, 2022

Inside the container, can you please run ls -la /var/www/baikal/Specific and show the output?

@stephenmetzger
Copy link
Author

stephenmetzger commented Jan 13, 2022

@ckulka, thanks for the quick response. Output is:

drwxrwxrwx 1 nginx nginx   40 Jan 13 11:29 .
drwxr-xr-x 1 nginx nginx   88 Jan 26  2021 ..
-rw-rw-rw- 1 nginx nginx 6148 Jan 13 11:29 .DS_Store
-rw-rw-rw- 1 nginx nginx   31 Jan 10 20:11 .htaccess
drwxrwxrwx 1 nginx nginx    0 Jan 13 11:29 db

@ckulka
Copy link
Owner

ckulka commented Jan 13, 2022

That looks all correct, can you please try the this command to see if the nginx user is able to write into that folder (just like the permissions suggest):

docker exec -itu nginx <container> touch /var/www/baikal/Specific/test.txt
docker exec -itu nginx <container> mkdir /var/www/baikal/Specific/test-folder
docker exec -itu nginx <container> touch /var/www/baikal/Specific/db/test.txt

# Cleanup test files
docker exec -itu nginx -w /var/www/baikal/Specific <container> rm -rf test.txt test-folder db/test.txt

Stupid answer, but if that all works well it looks all fine, I'd just give it another try and delete the local folders, recreate Specific with open permissions and rerun Baikal... maybe it just hung up during the first start.

You could try not using sqlite and instead use MySQL/MariaDB/something else, but imho that'll just make your life more complicated later w.r.t backups and restores. If you don't need the performance, then I'd stick with sqlite and rather fix the file permissions.

Maybe @Joshndroid came across this too, I don't habe UnRAID and don't know if there's something else I'm missing.

@stephenmetzger
Copy link
Author

stephenmetzger commented Jan 13, 2022

Thanks. All commands worked. Deleted the host folders (in appdata in UnRAID), and then removed Baikal from UnRAID. Reinstalled, and was able to get to the wizard (I may have been able to before as well... but I've been playing with a lot of calDAV/cardDAV and syncing services in UnRAID over the past few days... so may have forgotten that I had gone through a setup wizard).
At the wizard, saw that there was an option to use MySQL as a database embedded, so i went ahead and created a new database and user, used mysql, and seem to be running now.
Thanks!

@ckulka
Copy link
Owner

ckulka commented Jan 13, 2022

Good to hear, I'll then close the issue 👍 Hope backups of MySQL are easy in your environment too, would be a shame to not have backups because of some odd file permission issues with sqlite.

@idrahendil
Copy link

Hi, similar to the post opener, i got the following error directly after installing the docker container in unraid and after opening the WebUI the first time:

Error - Insufficient permissions on the configuration folders
In order to work properly, Baïkal needs to have write permissions in the Specific/ and config/ folder.

The two folder config and Specific were created in the appdata folder of Unraid and both have the permissions drwxr-xr-x

That looks all correct, can you please try the this command to see if the nginx user is able to write into that folder (just like the permissions suggest):

docker exec -itu nginx <container> touch /var/www/baikal/Specific/test.txt
docker exec -itu nginx <container> mkdir /var/www/baikal/Specific/test-folder
docker exec -itu nginx <container> touch /var/www/baikal/Specific/db/test.txt

# Cleanup test files
docker exec -itu nginx -w /var/www/baikal/Specific <container> rm -rf test.txt test-folder db/test.txt

This worked without an issue as well, all the testfiles and folders were created. I have also completly reinstalled the docker once (delete folders etc befor), but that didn't helped either.

Any other ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants