Can't write into config directory! - Need more understandig

Hi Community,

try to install Nextcloud 31 on opensuse Trumbleweed . Using handout
https://en.opensuse.org/SDB:Nextcloud
https://en.opensuse.org/SDB:LAMP_setup
Testing → apache2 server works
Install php8 with modules that Nextcloud recommend. (hope so)
Testing php8 → '[10.10.10.30/index.php] ; it is working :muscle:
Process-owner Apache is wwwrun.
Install mariadb and config → all things are okay :+1:

Nexcloud ist installed at /srv/www/htdocs/nextcloud direcoriy owner is wwwrun und protection default Nexcloud.

drwxr-xr-x. 1 wwwrun wwwrun 538 May 2 10:03 nextcloud/

Config Nextcloud at all over ssh from 10.10.10.1
So, initiate Nextcloud with http://10.10.10.30/nextcloud
==> Can’t write into config directory! This can usually be fixed by giving the webserver write access to the config directory.

Which config directory is meant? If /srv/www/htdocs/nextcloud/config
if this directory is meant then the rights are the following

drwxr-xr-x. 1 wwwrun wwwrun 74 May 3 09:55 config

so, but inside this directory are 3 files:

-rwxr-xr-x. 1 wwwrun wwwrun 665 Apr 17 05:06 .htaccess
-rwxr-xr-x. 1 wwwrun wwwrun 0 Apr 17 05:06 CAN_INSTALL
-rwxr-xr-x. 1 wwwrun wwwrun 84698 Apr 17 05:06 config.sample.php

I think CAN_INSTALL tells apache/web start Nextcloud and config now; and create a config.php - right?

I’ve read a lot of paper, but I could not find the right answer or idea.
I hope now I get the right tip.

foggy

I would cross-check with official Nextcloud docs… the docs you linked refer to Nextcloud 11 and 12… which is very very very old :man_facepalming:

What are the permissions of /srv/www/htdocs/nextcloud?
With sudo -u wwwrun ls /srv/www/htdocs/nextcloud/config you can check if the wwwrun-user has permission to look into the folder (often, there are issues in one of the parent folders)

wwe,
thanks for your information, but this links show installation for openSUSE leap 15,4 and to Tumbleweed, not to openSUSE 11 or 12

foogy

All permission are okay; but I take a look if btfs is the problem /srv ist logical volume.

/dev/sdb2 on /srv type btrfs (rw,relatime,seclabel,space_cache=v2,subvolid=259,subvol=/@/srv)

No, should be okay.
I’ll try a new installtion.
Remark: My live Nextcloud 30 an Debian 12 is working perfect.

this what is wrong

wget https://download.nextcloud.com/server/releases/nextcloud-12.0.4.zip

okay, I took nextcloud-30.0.10.zip

Hi again,

I’ve tried to install Nextcloud “latest” with this handout - but I have no luck.

https://idroot.us/install-nextcloud-opensuse/

http://10.10.10.30/nextcloud

Can’t write into config directory! This can usually be fixed by giving the webserver write access to the config directory.

I don’t understand it - sorry. Which config dir?

§/srv/www/htdocs/nextcloud/config> l
insgesamt 88
drwxr-xr-x. 1 wwwrun www 74 17. Apr 11:10 ./
drwxr-xr-x. 1 wwwrun www 518 6. Mai 15:32 ../
-rwxr-xr-x. 1 wwwrun www 0 17. Apr 11:06 CAN_INSTALL*
-rwxr-xr-x. 1 wwwrun www 84698 17. Apr 11:06 config.sample.php*
-rwxr-xr-x. 1 wwwrun www 665 17. Apr 11:06 .htaccess*

sudo -u wwwrun touch /srv/www/htdocs/nextcloud/config/HalloWorld

rb@Next:~> sudo -u wwwrun ls -lisa /srv/www/htdocs/nextcloud/config
insgesamt 88
36026 0 drwxrwxr-x. 1 wwwrun wwwrun 102 8. Mai 08:40 .
268 0 drwxr-xr-x. 1 wwwrun wwwrun 556 7. Mai 21:14 ..
36027 0 -rwxr-xr-x. 1 wwwrun wwwrun 0 17. Apr 11:06 CAN_INSTALL
36028 84 -rwxr-xr-x. 1 wwwrun wwwrun 84698 17. Apr 11:06 config.sample.php
68720 0 -rw-r–r–. 1 wwwrun wwwrun 0 8. Mai 08:40 HalloWorld
36029 4 -rwxr-xr-x. 1 wwwrun wwwrun 665 17. Apr 11:06 .htaccess

Lamp-Stack is running → Test okay!
NextCloud-Version 31.0.4.1
PHP Version 8

Next:~ # zypper lr -E
Repository priorities are without effect. All enabled repositories share the same priority

| Alias | Name | Enabled | GPG Check | Refresh

–±--------------±---------------------------------------±--------±----------±-------
3 | repo-non-oss | openSUSE-Tumbleweed-Non-Oss | Yes | (r ) Yes | Yes
4 | repo-openh264 | Open H.264 Codec (openSUSE Tumbleweed) | Yes | (r ) Yes | Yes
5 | repo-oss | openSUSE-Tumbleweed-Oss | Yes | (r ) Yes | Yes
7 | repo-update | openSUSE-Tumbleweed-Update | Yes | (r ) Yes | Yes

Where is the error, where do I need to adjust or check?

Greeting from Germany

foogy

as you are running suse you will probably have selinux active on it as well. That can cause issues and not being able to write to that directory as well

SmallOne,

that’s the solution - for that. Nobody over the world give that tip only you . :clap:
Okay, but I don’t know what does it mean for my OS installation?
Start browser but they what use DB SQLlite - never config SQLlite;
Config - mariaDB : ```
sudo mysql -u root -p

okay, now I know that selinux must be taken into account.

foogy

SELinux needs to be configured to work with Nextcloud, there are some hints in the documentation:

Regarding tutorials, if they are older, they might rely on different software configurations, Nextcloud at that time did things perhaps differently, SELinux was not in OpenSUSE or configured differently, … so even if the documentation is suitable, it is often worth checking with other with more recent systems.
And if tutorials have forum/comments etc. attached, you can leave a comment what issue you had and how you solved it.

1 Like