[Bug]: occ maintenance:install
fails on read-only htdocs directory #42286
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
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
- Create a read-only webspace.
- Install Nextcloud 27.1.5 or 28.0.0 there.
- Execute the installation process via the command
occ maintenance:install
. - The command will fail because it requires write-access to the htdocs direcotry.
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?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response