Soberia / bypasshub

An abstraction around the set of tools to bypass internet censorship in extremely restricted regions.
MIT License
8 stars 5 forks source link

unable to open database file #4

Closed aplm1999 closed 6 months ago

aplm1999 commented 7 months ago

after install we have this code "unable to open database file" in docker log and restart bypasshub

Soberia commented 7 months ago

Make sure you have permission to read and write in bypasshub/database directory. If you cloned the repository as the root user, that may be the cause for the wrong permissions.

aplm1999 commented 7 months ago

"dependency failed to start: container bypasshub-certbot-1 exited (1)" at first but at second time did it but ocserv and xray didnt work and reseted repeatly with these errors "error: cannot open file /tmp/ocserv/ocsp.der", "error: cannot open file /etc/letsencrypt/live/any-net.shop/fullchain.pem" , "nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/any-net.shop/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/any-net.shop/fullchain.pem, r) error:10000080:BIO routines::no such file)"

Soberia commented 7 months ago

The containers do not run as a privileged user. They can't access the files if they don't have the required permission.

Remove the certbot/letsencrypt directory.

sudo rm -r certbot/letsencrypt

Run this command to make the project directory and all the containing files and subdirectories world accessible:

sudo chmod -R 0777 /path/to/bypasshub

and if there are no more errors, use more stricter permissions.