[GH-ISSUE #13] userinfo.db #5

Closed
opened 2026-02-26 12:33:41 +03:00 by kerem · 4 comments
Owner

Originally created by @ghost on GitHub (Feb 5, 2019).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/13

How do I create userinfo.db? I get an error message when I start ss-server because userinfo.db does not exist.

Originally created by @ghost on GitHub (Feb 5, 2019). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/13 How do I create userinfo.db? I get an error message when I start ss-server because userinfo.db does not exist.
kerem closed this issue 2026-02-26 12:33:41 +03:00
Author
Owner

@cbeuw commented on GitHub (Feb 7, 2019):

What OS are you using? userinfo.db should be created automatically to the current directory if it doesn't exist. Make sure you have permission to create files in the directory you start ss-server

<!-- gh-comment-id:461290884 --> @cbeuw commented on GitHub (Feb 7, 2019): What OS are you using? userinfo.db should be created automatically to the current directory if it doesn't exist. Make sure you have permission to create files in the directory you start ss-server
Author
Owner

@ghost commented on GitHub (Feb 7, 2019):

Server is running Ubuntu 18.04.

All steps are done as root.

shadowsocks-libev listens on port 443. There is a web server listening on port 8443.

shadowsocks-libev is configured with:

    "plugin":"/usr/local/bin/ck-server",
    "plugin_opts":"/etc/ck-server/config.json"

The configuration file /etc/ck-server/config.json looks like this:

{
"WebServerAddr":"127.0.0.1:8443",
"PrivateKey":"UKc1jvZgl0vFqP3Cpw23wyfoTod8yWHCf87MsKvLglY=",
"AdminUID":"IS0rRsd8HNtnWLmnxvPMtQfUtE0GoJ2GmPio+CSYbkk=",
"DatabasePath":"userinfo.db",
"BackupDirPath":""
}

Shadowsocks-libev is started by systemd:

systemctl restart shadowsocks-libev
<!-- gh-comment-id:461376517 --> @ghost commented on GitHub (Feb 7, 2019): Server is running Ubuntu 18.04. All steps are done as root. shadowsocks-libev listens on port 443. There is a web server listening on port 8443. shadowsocks-libev is configured with: ``` "plugin":"/usr/local/bin/ck-server", "plugin_opts":"/etc/ck-server/config.json" ``` The configuration file `/etc/ck-server/config.json` looks like this: ``` { "WebServerAddr":"127.0.0.1:8443", "PrivateKey":"UKc1jvZgl0vFqP3Cpw23wyfoTod8yWHCf87MsKvLglY=", "AdminUID":"IS0rRsd8HNtnWLmnxvPMtQfUtE0GoJ2GmPio+CSYbkk=", "DatabasePath":"userinfo.db", "BackupDirPath":"" } ``` Shadowsocks-libev is started by systemd: ``` systemctl restart shadowsocks-libev ```
Author
Owner

@cbeuw commented on GitHub (Feb 7, 2019):

DatabasePath field of the config file is a relative path, Cloak will attempt to create userinfo.db at the current working directory. For systemctl services I believe that's /. This is most likely not where you want to put the userinfo.db and it may have trouble creating it.

Try to change DatabasePath to an absolute path like /home/[your username]/[some sub directories]/userinfo.db. Do the same to BackupDirPath as well because otherwise ck-server will attempt to create database backups under /

<!-- gh-comment-id:461380915 --> @cbeuw commented on GitHub (Feb 7, 2019): DatabasePath field of the config file is a relative path, Cloak will attempt to create userinfo.db at the current working directory. For systemctl services I believe that's /. This is most likely not where you want to put the userinfo.db and it may have trouble creating it. Try to change DatabasePath to an absolute path like /home/[your username]/[some sub directories]/userinfo.db. Do the same to BackupDirPath as well because otherwise ck-server will attempt to create database backups under /
Author
Owner

@ghost commented on GitHub (Feb 7, 2019):

Yes, it was a permissions problem, thanks. Testing completed successfully.

<!-- gh-comment-id:461445233 --> @ghost commented on GitHub (Feb 7, 2019): Yes, it was a permissions problem, thanks. Testing completed successfully.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cloak#5
No description provided.