[GH-ISSUE #2281] Can't create test file #6626

Closed
opened 2026-04-20 17:13:20 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ThePlanplan on GitHub (Feb 23, 2026).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/2281

Pre-submission checklist

  • I have searched for existing open or closed issue reports with the same problem.

Description

I have a Debian install, that is working as root. After hardening systemd, with a new user, I'm stuck with the error "Could not init file handler: storage validation failed" :
Could not init file handler: storage validation failed: failed to create test file at /opt/vikunja/files/.vikunja-check-1771854780398630535: open /opt/vikunja/files/.vikunja-check-1771854780398630535: read-only file system\n[process uid=994 gid=992, dir owner uid=994 gid=992]

It look a bit like the error of some Docker rootless #2162

I checked all dirs permissions, everything is fine. Also, checked the systemd override file, I had to correct ExecStart being duplicated, it's starting but the test file error happen.

When executing vikunja doctor as my new "vikunja" user, everything is fine :

Vikunja Doctor
==============

System
  ✓ Version: v1.1.0
  ✓ Go: go1.25.7
  ✓ OS: linux/amd64
  ✓ User: vikunja (uid=994)
  ✓ Working directory: /home/debian
  ✓ User namespace: not active

Configuration
  ✓ Config file: /etc/vikunja/config.yml
  ✓ Public URL: https://redacted.com/
  ✓ JWT secret: configured (auto-generated)
  ✓ CORS origins: http://127.0.0.1:*
      http://localhost:*
      https://redacted.com

Database (sqlite)
  ✓ Connection: OK
  ✓ Server version: 3.51.1

Files (local)
  ✓ Path: /opt/vikunja/files
  ✓ Directory exists: yes
  ✓ Directory permissions: 0755
  ✓ Directory owner: vikunja:vikunja (uid=994, gid=992)
  ✓ Writable: yes
  ✓ Disk space: 9.6 GB available
  ✓ Stored files: 0 files, 0 B total

Mailer
  ✓ SMTP connection: OK (redacted.com:587)

All checks passed

Vikunja Version

Vikunja api version v1.1.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

Originally created by @ThePlanplan on GitHub (Feb 23, 2026). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/2281 ### Pre-submission checklist - [x] I have searched for existing open or closed issue reports with the same problem. ### Description I have a Debian install, that is working as root. After hardening systemd, with a new user, I'm stuck with the error "Could not init file handler: storage validation failed" : `Could not init file handler: storage validation failed: failed to create test file at /opt/vikunja/files/.vikunja-check-1771854780398630535: open /opt/vikunja/files/.vikunja-check-1771854780398630535: read-only file system\n[process uid=994 gid=992, dir owner uid=994 gid=992]` It look a bit like the error of some Docker rootless #2162 I checked all dirs permissions, everything is fine. Also, checked the systemd override file, I had to correct ExecStart being duplicated, it's starting but the test file error happen. When executing vikunja doctor as my new "vikunja" user, everything is fine : ``` Vikunja Doctor ============== System ✓ Version: v1.1.0 ✓ Go: go1.25.7 ✓ OS: linux/amd64 ✓ User: vikunja (uid=994) ✓ Working directory: /home/debian ✓ User namespace: not active Configuration ✓ Config file: /etc/vikunja/config.yml ✓ Public URL: https://redacted.com/ ✓ JWT secret: configured (auto-generated) ✓ CORS origins: http://127.0.0.1:* http://localhost:* https://redacted.com Database (sqlite) ✓ Connection: OK ✓ Server version: 3.51.1 Files (local) ✓ Path: /opt/vikunja/files ✓ Directory exists: yes ✓ Directory permissions: 0755 ✓ Directory owner: vikunja:vikunja (uid=994, gid=992) ✓ Writable: yes ✓ Disk space: 9.6 GB available ✓ Stored files: 0 files, 0 B total Mailer ✓ SMTP connection: OK (redacted.com:587) All checks passed ``` ### Vikunja Version Vikunja api version v1.1.0 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
Author
Owner

@kolaente commented on GitHub (Feb 23, 2026):

This sounds like an issue caused by systemd hardening. When you run the doctor command, the hardening is not active because you're running the Vikunja binary directly, outside the systemd sandbox.

To fix this, you need to explicitly allow writes to your files directory in your systemd override. For example (curtsy of Claude):

[Service]
ReadWritePaths=/opt/vikunja/files

If your SQLite database is also stored outside the default paths, you may need to add that path too. You can apply this with:

You can check which protections are active with: systemd-analyze security vikunja.

<!-- gh-comment-id:3946984765 --> @kolaente commented on GitHub (Feb 23, 2026): This sounds like an issue caused by systemd hardening. When you run the doctor command, the hardening is not active because you're running the Vikunja binary directly, outside the systemd sandbox. To fix this, you need to explicitly allow writes to your files directory in your systemd override. For example (curtsy of Claude): ``` [Service] ReadWritePaths=/opt/vikunja/files ``` If your SQLite database is also stored outside the default paths, you may need to add that path too. You can apply this with: You can check which protections are active with: `systemd-analyze security vikunja`.
Author
Owner

@ThePlanplan commented on GitHub (Feb 24, 2026):

Yeah, I added all needed informations... but forgot to uncomment the top "database" in the config... 😕
Spending too much time on a ridiculous error...

Sorry for the false bug report.

<!-- gh-comment-id:3952162410 --> @ThePlanplan commented on GitHub (Feb 24, 2026): Yeah, I added all needed informations... but forgot to uncomment the top "database" in the config... 😕 Spending too much time on a ridiculous error... Sorry for the false bug report.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6626