Repository navigation
Let FTP read diagnostics logs in the storage root - #29
ducktailgoat wants to merge 1 commit into
Conversation
The storage root /download0/opennow was created 0700 and owned by the app's uid, so homebrew FTP servers (which lack root override on the sandbox mount) got 550 on it and could not fetch network.log, media.log or live-video.status, even while the app was running. Create the root as 0755 and fchmod existing installs at startup. The chmod is best effort so a failure cannot block login storage. Account, settings and session files remain 0600 and the artwork cache remains 0700, so only diagnostics become readable.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Summary
Homebrew FTP servers cannot read the app's diagnostics: the app creates
/download0/opennowas 0700 under its own uid, and ftpsrv (1.16) gets550 Permission deniedon it even while the app is running. Fetchingmedia.logmeant copying the wholedownload0.datimage, which also containsaccount.bin.Resulting modes on the console:
Evidence
Before (PS5, app running):
LIST /mnt/sandbox/PPSA99082_000/download0/opennowreturns550 Permission denied; RETR of every log fails the same way.After (same PS5, first launch of the new build upgrades the existing install): the folder lists,
media.log,network.logandlive-video.statusdownload, andaccount.bin/session.binstill return550 Permission denied.Host test:
tests/app_storage_test.cppassertsmkdirwith 0755,fchmod0755 on the root descriptor, and thatinitialize()still returns 0 whenfchmodfails (EPERM). It failed before the change and passes after it.Merge Danger
Door: two-way for the code. Installs already upgraded keep their 0755 folder after a revert until something chmods it back.
Blast Radius: console-local file visibility.
Anything that can read the title's
download0(FTP, other homebrew) can now list file names and read diagnostics: logs,live-video.status,video-sps.binand opt-in capture files. Secrets stay 0600. One pre-existing detail becomes reachable: files created withfopen(live-video.status, capture output) land as 0666 on the console, so they are now writable as well as readable by other local processes.