IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
23.74k stars 1.28k forks source link

Editing the Nextcloud config.php in CasaOS changes ownership from "www-data" to "root" [Bug] #829

Closed danieljonce closed 1 year ago

danieljonce commented 1 year ago

Describe the bug After a fresh install of Nextcloud in CasaOS running on Debian everything works as expected until a change is made to config.php using the text editor in CasaOS

To Reproduce 1) Install Nextcloud via CasaOS 2) Verify it's working correctly 3) Save a change to the /var/www/config/config.php file using the CasaOS text editor 4) Refresh Nextcloud, it will now throw an error "Cannot write into "config" directory!"

Expected behavior I expect the previous file ownership "www-data www-data" to persist after a file change but it is changed to "root root"

The two ways I've found to work around the issue:

1) Use chown www-data:www-data var/www/html/config/config.php from the host OS console (not the Docker container) to change the ownership for config.php back to www-data www-data

OR

2) Set the flag 'config_is_read_only' => true, in the config.php, which works temporarily but during Nextcloud updates the config.php file needs to be writeable.

LinkLeong commented 1 year ago

The problem of directory accumulation due to upgrade has been solved in 0.4.2

raller1028 commented 1 year ago

v0.4.2 has been released, if still have problem please reopen