fix(docker): make configureNextcloud work with bind mounted apps - #1063
Open
luflow wants to merge 1 commit into
Open
fix(docker): make configureNextcloud work with bind mounted apps#1063luflow wants to merge 1 commit into
luflow wants to merge 1 commit into
Conversation
Docker pre-creates `/var/www/html/apps-writable` as root when an app is bind mounted into it, so the `chown` handing the directory to `www-data` has to run as root as well. Without it `configureNextcloud` aborts with "chown: changing ownership of '/var/www/html/apps-writable': Operation not permitted". The app list also has to be built after `apps.config.php` registered `apps-writable` as an apps path, otherwise mounted apps are missing from it and are then installed from the app store, which fails with "<app> already installed". Signed-off-by: Florian Ludwig <florian@krautnerds.de>
luflow
force-pushed
the
fix/noid/bind-mounted-apps
branch
from
July 28, 2026 16:02
2bffbd8 to
1534520
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
configureNextcloud()currently aborts onmainas soon as an app is bind mounted intoapps-writable(whichstartNextcloud(branch, true)does by default):Docker pre-creates the bind mount target as
root, butrunExecdefaults towww-data, which may notchownit.After fixing that, the next call fails too:
app:listis queried beforeapps.config.phpregistersapps-writableas an apps path, so the mounted app is missing from the list. It is then not found inshipped.jsoneither and ends up in the app store branch, whereapp:install --forceexits non-zero with "already installed".Both were introduced together with the
apps-writablehandling; the repo's own test suite passesmountApp: false, so neither is covered.Fix
mkdir/chownforapps-writableasroot(same as the existingdatadirectory handling instartNextcloud)apps.config.phphas been writtenTesting
npm run lint,npm run build,npx tsc --noEmit– cleannpm run test:node– 4/4 pass (unchanged behaviour,mountApp: false)nextcloud/attendance,stable34, macOS + Docker Desktop):configureNextcloudnow completes and reportsattendance 1.41.2 enabledinstead of aborting.Not verified: whether the
chownalso failed on Linux runners – this is the one platform dependent spot in the change, and I only had macOS + Docker Desktop available.