You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐞 Describe the bug
When installing ntfy-sh by enabling it as a module, the state directory is created in /var/lib/private/ntfy-sh and linked to /var/lib/ntfy-sh. This is a problem as the private folder is owned by root which makes the symlink inaccessible. Changing the permissions of the private folder seems to create other problems as ntfy-sh requests the folder be owned by root with permissions 0700 and that makes this problem a Catch-22 as by default ntfy-sh can't access the files in it's state folder and if permissions are changed, ntfy-sh does not want to access it's folder.
💻 Components impacted
ntfy server v2.8.0
💡 Screenshots and/or logs
Default:
× ntfy-sh.service - Push notifications server
Loaded: loaded (/etc/systemd/system/ntfy-sh.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-03-26 21:07:07 EET; 1s ago
Duration: 71ms
Process: 11056 ExecStart=/nix/store/wgb20j6kkxz0j6d5ihmn9g29giqx6wmp-ntfy-sh-2.8.0/bin/ntfy serve -c /nix/store/ma711yry2gs6s8vsnrah1cy9fx0iipdv-server.yml (code=exited, status=1/FAILURE)
Main PID: 11056 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
CPU: 69ms
Mar 26 21:07:07 server systemd[1]: Started Push notifications server.
Mar 26 21:07:07 server ntfy[11056]: 2024/03/26 21:07:07 FATAL attempt to write a readonly database (exit_code=1)
Mar 26 21:07:07 server ntfy[11056]: attempt to write a readonly database
Mar 26 21:07:07 server systemd[1]: ntfy-sh.service: Main process exited, code=exited, status=1/FAILURE
Mar 26 21:07:07 server systemd[1]: ntfy-sh.service: Failed with result 'exit-code'.
Too permissive:
× ntfy-sh.service - Push notifications server
Loaded: loaded (/etc/systemd/system/ntfy-sh.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-03-26 21:03:03 EET; 1s ago
Duration: 2ms
Process: 8743 ExecStart=/nix/store/wgb20j6kkxz0j6d5ihmn9g29giqx6wmp-ntfy-sh-2.8.0/bin/ntfy serve -c /nix/store/ma711yry2gs6s8vsnrah1cy9fx0iipdv-server.yml (code=exited, status=238/STATE_DIRECTORY)
Main PID: 8743 (code=exited, status=238/STATE_DIRECTORY)
IP: 0B in, 0B out
CPU: 882us
Mar 26 21:03:03 server systemd[1]: Started Push notifications server.
Mar 26 21:03:03 server (ntfy)[8743]: Directory "/var/lib/private" already exists, but has mode 0750 that is too permissive (0700 was requested), refusing.
Mar 26 21:03:03 server (ntfy)[8743]: ntfy-sh.service: Failed to set up special execution directory in /var/lib: File exists
Mar 26 21:03:03 server (ntfy)[8743]: ntfy-sh.service: Failed at step STATE_DIRECTORY spawning /nix/store/wgb20j6kkxz0j6d5ihmn9g29giqx6wmp-ntfy-sh-2.8.0/bin/ntfy: File exists
Mar 26 21:03:03 server systemd[1]: ntfy-sh.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Mar 26 21:03:03 server systemd[1]: ntfy-sh.service: Failed with result 'exit-code'.
Wrong User:
× ntfy-sh.service - Push notifications server
Loaded: loaded (/etc/systemd/system/ntfy-sh.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-03-26 21:04:50 EET; 1s ago
Duration: 3ms
Process: 9917 ExecStart=/nix/store/wgb20j6kkxz0j6d5ihmn9g29giqx6wmp-ntfy-sh-2.8.0/bin/ntfy serve -c /nix/store/ma711yry2gs6s8vsnrah1cy9fx0iipdv-server.yml (code=exited, status=238/STATE_DIRECTORY)
Main PID: 9917 (code=exited, status=238/STATE_DIRECTORY)
IP: 0B in, 0B out
CPU: 922us
Mar 26 21:04:50 server systemd[1]: Started Push notifications server.
Mar 26 21:04:50 server (ntfy)[9917]: Directory "/var/lib/private" already exists, but is owned by 989:986 (0:0 was requested), refusing.
Mar 26 21:04:50 server (ntfy)[9917]: ntfy-sh.service: Failed to set up special execution directory in /var/lib: File exists
Mar 26 21:04:50 server (ntfy)[9917]: ntfy-sh.service: Failed at step STATE_DIRECTORY spawning /nix/store/wgb20j6kkxz0j6d5ihmn9g29giqx6wmp-ntfy-sh-2.8.0/bin/ntfy: File exists
Mar 26 21:04:50 server systemd[1]: ntfy-sh.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Mar 26 21:04:50 server systemd[1]: ntfy-sh.service: Failed with result 'exit-code'.
The text was updated successfully, but these errors were encountered:
🐞 Describe the bug
When installing ntfy-sh by enabling it as a module, the state directory is created in
/var/lib/private/ntfy-sh
and linked to/var/lib/ntfy-sh
. This is a problem as the private folder is owned by root which makes the symlink inaccessible. Changing the permissions of the private folder seems to create other problems as ntfy-sh requests the folder be owned by root with permissions 0700 and that makes this problem a Catch-22 as by default ntfy-sh can't access the files in it's state folder and if permissions are changed, ntfy-sh does not want to access it's folder.💻 Components impacted
ntfy server v2.8.0
💡 Screenshots and/or logs
Default:
Too permissive:
Wrong User:
The text was updated successfully, but these errors were encountered: