Skip to content
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

Nextcloud installation: Cannot write into "config" directory #1885

Open
ValdikSS opened this issue Dec 17, 2020 · 5 comments
Open

Nextcloud installation: Cannot write into "config" directory #1885

ValdikSS opened this issue Dec 17, 2020 · 5 comments

Comments

@ValdikSS
Copy link

When installer executes sudo -u www-data php /usr/local/lib/owncloud/occ db:add-missing-columns, Nextcloud's php process can't write its configuration file.
This is freshly installed and fully updated Ubuntu 18.04.5.

Snippet running setup.sh with set -x:

…

++ hide_output wget -O /tmp/user_external.tgz https://github.com/nextcloud/user_external/releases/download/v1.0.0/user_external-1.0.0.tar.gz
+++ tempfile
++ OUTPUT=/tmp/filelldLyO
++ set +e
++ wget -O /tmp/user_external.tgz https://github.com/nextcloud/user_external/releases/download/v1.0.0/user_external-1.0.0.tar.gz
++ E=0
++ set -e
++ '[' 0 '!=' 0 ']'
++ rm -f /tmp/filelldLyO
++ echo '3bf2609061d7214e7f0f69dd8883e55c4ec8f50a  /tmp/user_external.tgz'
++ sha1sum --check --strict
++ tar -xf /tmp/user_external.tgz -C /usr/local/lib/owncloud/apps/
++ rm /tmp/user_external.tgz
++ chmod 750 /usr/local/lib/owncloud/apps /usr/local/lib/owncloud/config
++ ln -sf /home/user-data/owncloud/config.php /usr/local/lib/owncloud/config/config.php
++ chown -f -R www-data.www-data /home/user-data/owncloud /usr/local/lib/owncloud
++ /bin/true
++ '[' -e /home/user-data/owncloud/owncloud.db ']'
++ sudo -u www-data php /usr/local/lib/owncloud/occ db:add-missing-columns
Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory

Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/20/go.php?to=admin-config
++ '[' '!' -f /home/user-data/owncloud/owncloud.db ']'
++ mkdir -p /home/user-data/owncloud
+++ sha1sum

…
@ValdikSS
Copy link
Author

Running this command manually later produces no error.
Running php interpreter from www-data user also allows reading and writing of configuration file, as well as creating new files inside config folder.

@ctapmex
Copy link

ctapmex commented Jan 13, 2021

confirm. This line

sudo -u www-data php /usr/local/lib/owncloud/occ db:add-missing-columns
is excess.
migration, if needed, takes place at
InstallNextcloud() {

@alento-group
Copy link
Contributor

`Installing Nextcloud (contacts/calendar)...
Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2021-05-19-19:22:50...

Upgrading to Nextcloud version 20.0.1

Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory

Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/20/go.php?to=admin-config
Nextcloud is already latest version
photos 1.2.0 disabled
dashboard 7.0.0 disabled
activity 2.13.2 disabled
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
`

So just copying the message shown ... it may be helpful to some /shrug.

I would think that we'd want to fix this as I am sure new users to MiaB would find it troubling perhaps??

@davidjmeier
Copy link

Just ran into this during an install for the first time. Is this something that the end user needs to go back and fix, or?

Thanks!

@bluetardis
Copy link

bump
same issue 2022-04-20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants