Commit graph

3 commits

Author SHA1 Message Date
lrnselfreliance
f2e3eba226
Fix media permissions: make the library readable by every service (#1042)
* Fix media permissions: make the library readable by every service

The script only made sure WROLPi (the owner) could read and write, so a
700 directory passed its check while Caddy, which serves media as its own
user, answered 403 for every file in it.

Library directories now get at least 755 and files 644, only ever adding
bits. config/ keeps only owner fixes: it holds the VPN's key and login.
The summary counts ownership fixes too, instead of reporting 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix permissions: skip config/ even when the media path ends in a slash

find prints paths as given, so a MEDIA_DIRECTORY with a trailing slash (from .env)
never matched the config/ prune, and the library pass opened the VPN key to other
users.  The tests also no longer depend on the umask.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:32:58 -07:00
Roland
4008312077
File permissions fix script checks for exfat and other file systems before trying to repair, displays a warning and gives advice on how to fix the issue.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
2026-03-05 18:18:53 -07:00
Roland
71c2b6cd6a
Creating script that fixes media directory file and directory permissions, adding it to the Controller UI. 2026-03-05 17:58:21 -07:00