-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[Bug]: occ maintenance:install
fails on read-only htdocs directory
#42286
Comments
occ maintenance:install
requires write-access to its htdocs directoryocc maintenance:install
fails on read-only htdocs directory
The first error in the linked issue is the result of a recently added check to make sure there's enough disk space available before writing out the Lines 562 to 573 in cd32db6
As for The code for the command is here: https://github.com/nextcloud/server/blob/master/core/Command/Maintenance/Install.php |
Problem is at line 568. |
I think we should rather chevk if the dir is read only and then return false... |
Yes, the snap is a squashfs image, which is by definition 100% full and read-only. |
Remember that config.php could be held entirely out of the webroot. Read-only webroots are not uncommon. |
PR at #42298 |
Thank you, @solracsf! |
Bug description
Since Nextcloud 27.1.5 and Nextcloud 28.0.0 the occ command for manual install requires write-access to the htdocs directory. This were not the case before and allowed Nextcloud to be deployed via the SNAP environment.
Ref: nextcloud-snap/nextcloud-snap#2631 (comment)
This prevents us from updating our snap packges at the moment as the snap environment is read-only for security reasons.
Is there a workaround for this to execute manual install without the need for write-access?
Steps to reproduce
occ maintenance:install
.Expected behavior
Do not require write-access on
occ maintenance:install
or at least try-catch and skip the steps that would write to the htdocs directory, so the command will execute successfully - like in v27.1.4 and earlier.Installation method
Community SNAP package
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: