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
panic: get user cache dir: neither $XDG_CACHE_HOME nor $HOME are defined #391
Comments
oh interesting. which OS? |
Debian/testing, but I think that this "particular setup" comes from my systemd unit: root@belette64/u/l/bin> systemctl cat gonic.service
# /etc/systemd/system/gonic.service
[Unit]
Description=Gonic Subsonic API server
After=network.target
[Service]
Type=simple
DynamicUser=yes
Group=nas
StateDirectory=gonic
CacheDirectory=gonic
ConfigurationDirectory=gonic
Restart=on-failure
RestartSec=10
ExecStart=/usr/local/bin/gonic -config-path /etc/gonic/config
MemoryDenyWriteExecute=true
# See https://github.com/sentriz/gonic/issues/391
Environment=XDG_CACHE_HOME=/var/cache/gonic/
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/gonic.service.d/00security.conf
[Service]
SystemCallFilter=@system-service
PrivateDevices=yes
ProtectHome=yes
ProtectSystem=strict
PrivateUsers=yes
PrivateTmp=yes
NoNewPrivileges=yes
ProtectClock=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProcSubset=pid
CapabilityBoundingSet=
RestrictRealtime=yes
ProtectHostname=yes
RestrictNamespaces=yes
LockPersonality=yes
RestrictSUIDSGID=yes
ProtectControlGroups=yes
RemoveIPC=yes
SystemCallArchitectures=native
Adding the |
hm I suppose that since you created a specific gonic user without a home dir, there was no xdg cache dir found. yeah I think you're right in reusing the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gonic version: 0.16
if from docker, docker tag:
if from source, git tag/branch: b17e76e
It seems that a669ba8 introduced
os.UserCacheDir()
which fails.I expect gonic to use
cache-path
from the configuration.The text was updated successfully, but these errors were encountered: