Arch linux arm on rbp2 - pacman installation error

Hello there, this is m first post and I hope I am doing right to post here…
I am running Raspberry Pis and want to install the official arch arm package on a rbp 2.
Having prepared nginx and mariadb according the instructions on
https://wiki.archlinux.org/index.php/Nextcloud
installing the nextcloud package 15.0.0-1 failed with the following error message:
---- snip ----
[root@raspi2 erik]# pacman -Sy nextcloud
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
warning: nextcloud-15.0.0-1 is up to date – reinstalling
resolving dependencies…
looking for conflicting packages…

Packages (1) nextcloud-15.0.0-1

Total Installed Size: 154.98 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes…
(1/1) reinstalling nextcloud [######################] 100%
:: Running post-transaction hooks…
(1/2) Update Nextcloud installation
PHP Warning: require_once(): open_basedir restriction in effect. File(/usr/share/webapps/nextcloud/console.php) is not within the allowed path(s): (/data/disk1) in /usr/share/webapps/nextcloud/occ on line 11

Warning: require_once(): open_basedir restriction in effect. File(/usr/share/webapps/nextcloud/console.php) is not within the allowed path(s): (/data/disk1) in /usr/share/webapps/nextcloud/occ on line 11
PHP Warning: require_once(/usr/share/webapps/nextcloud/console.php): failed to open stream: Operation not permitted in /usr/share/webapps/nextcloud/occ on line 11

Warning: require_once(/usr/share/webapps/nextcloud/console.php): failed to open stream: Operation not permitted in /usr/share/webapps/nextcloud/occ on line 11
PHP Fatal error: require_once(): Failed opening required ‘/usr/share/webapps/nextcloud/console.php’ (include_path=’.:’) in /usr/share/webapps/nextcloud/occ on line 11

Fatal error: require_once(): Failed opening required ‘/usr/share/webapps/nextcloud/console.php’ (include_path=’.:’) in /usr/share/webapps/nextcloud/occ on line 11
error: command failed to execute correctly
(2/2) Arming ConditionNeedsUpdate…
---- snip ----
The error messages (highlighted in bold) seem to point to a problem with some path, which is
/data/disk1…
in which my nginx web root directory for html and php files is (shall be) located. nginx and php works so far.
How to interpret the error message exactly?
Which post-transaction hooks are performed? Where to find mor info on that?
Any hint to better understand whats going on and how to fix it?

Can anybody help me?
cheers and a nice Christmas time for you all :slight_smile:
Kallewirsch666

Hi,

open_basedir
Is a configuration parameter for PHP. It can be enabled for security reasons and that’s the case on your system.
In case open_basedir shall be used, you have to configure the directories which are allowed to be loaded by PHP. And your NC directory is not allowed yet.
Have a look at your php.ini, search for open_basedir and add the path
/usr/share/webapps/nextcloud/

Different paths can be added comma separated.
You find some hints regarding this parameter in this forum and in the Nextcloud documents. You should have a look in the docs anyway regarding “/dev/urand/”.

I hope it helps.

Marry Christmas to you as well!

Thanks much! Your hint was good.
I could solve this issue.
(and face the next one :|.
Want to configure nextcloud in a subdir of webroot. php files are correctly processed in web root but not in webroot/nextcloud…
Need to sort out the correct nginx config. )
And BTW: I have configured a pacman hook by my own according the arch wiki. This explains why this installation error have occurred anyhow.
cheers, kallewirsch666

You’re very welcome :slight_smile:
To avoid issues in the future I recommend to copy the nginx config from the NC documentation. There is a config for NC in root directory and a config for NC in a subdirectory.

Oh, I did this. I tried both versions of the NC nginx.conf examples.
The arch Wiki is referring to it as well.
I have had strange problems that I could execute a test php file in the web servers root but not in the nextcloud sub folder.
Having NC in the web root no and use default installation directories brought me to the initial starting page of NC where I get a
https://myraspberry/index.php/login
file not found
page, when clicking on “finish installation”.

Any idea about that?
I suspect still php issues, but have no idea how to narrow down the problem further without switching on logging everywhere to see if I get more hints. (I try to save this time)

Meanwhile I am trying to install nextcloud on arch arm using the apache httpd to compare and see if I can find out more. Not ready yet…

I wonder if there is anybody out there who was successful with the combination nextcloud and arch linux on raspberry pi…(?)

cheers
Kallewirsch

Hello,
On another raspberry pi (model 3) I installed nextcloud 15.0.0-1 with apache and mariadb on arch arm linux.
It is working now and I can learn about the nextcloud application itself.
The configuration was quite complex, the arch documentation is nested and you have to read carefully, but it is impressively precise. If everything running smooth I’ll try to post a summary and an example config which is working for me.
With nginx I failed to get it running, here I find the documentation of the arch wiki and the nextcloud pages confusing in terms of merging the required entries of both documentations. The nextcloud examples at the nextcloud pages did not work for me (for arch linux on arm architecture), but that is probably my fault, because I am not familiar with nginx and php configurations.
cheers
Kallewirsch