You are not logged in.

#76 2021-02-27 11:26:03

doragasu
Member
Registered: 2012-03-03
Posts: 144

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

I got everything to work excepting TOTP, every time I try enabling it in the security options, I get a popup stating it cannot be enabled.

Anyone here using TOTP that got it working with PHP8? Help would be appreciated. I have tried uninstalling the app, performing an occ twofactorauth:cleanup totp, clearing oc_twofactor_backupcodes, oc_twofactor_providers and oc_twofactor_totp_secrets tables from database, then reinstalling the app, but it still refuses to get enabled.

Nextcloud logs show the following exception in /usr/share/webapps/nextcloud/lib/private/AppFramework/App.php: hash_hkdf(): Argument #2 ($key) cannot be empty

Maybe another problem with PHP8?

Last edited by doragasu (2021-02-27 11:30:50)

Offline

#77 2021-02-28 19:42:25

wincc
Member
Registered: 2016-05-14
Posts: 5

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

I´m back "ontrack" with  Arch & Nextcloud 21, downloaded nextcloud-21 from nextcloud.com and made a installation without pacman ( not what I like todo, but got it up and running ), maybe next release can be installed with pacman without fibbleling with things....

Offline

#78 2021-03-01 09:59:28

kde35
Member
Registered: 2015-04-13
Posts: 65

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Has anyone tried 21.0.0.8?

Offline

#79 2021-03-01 10:18:52

bjo
Member
Registered: 2011-09-10
Posts: 71

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

You can take a look yourself what has changed: https://github.com/archlinux/svntogit-c … loud/trunk

Offline

#80 2021-03-01 10:44:27

str0gg
Member
Registered: 2012-12-01
Posts: 60
Website

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

@kde35 unfortunately I tried... script to fix permissions

#!/bin/bash
ocpath='/usr/share/webapps/nextcloud'
htuser='nextcloud'
htgroup='nextcloud'
rootuser='root'

printf "Creating possible missing Directories\n"
mkdir -p $ocpath/data
mkdir -p $ocpath/assets

printf "chmod Files and Directories\n"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750

printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/

chmod +x ${ocpath}/occ

printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
then
    chmod 0644 ${ocpath}/.htaccess
    chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
then
    chmod 0644 ${ocpath}/data/.htaccess
    chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi

Offline

#81 2021-03-01 13:24:13

damjan
Member
Registered: 2006-05-30
Posts: 434

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

One of the mistakes in the current setup (a compound Nextcloud and Arch mistake) is to have the /etc/nextcloud/config/config.php to be a writable directory and file.

/etc is for configuration, an application should NEVER change its configuration. Since nextcloud expects to change its config.php, that is *application state*. Application state should live in /var/lib/.

Offline

#82 2021-03-02 06:07:33

ElectricPrism
Member
Registered: 2012-12-07
Posts: 35

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

I was able to return to a functional NextCloud on PHP 8.

A. Set Config to Read Only

In file `/etc/webapps/nextcloud/config/config.php` -- add to 1 line up from EOF / config array:

  'config_is_read_only' => true,`

B. Set Permissions

sudo chown -R http:http /etc/webapps/nextcloud
sudo chown -R http:http /usr/share/webapps/nextcloud
sudo chown -R http:http /var/lib/nextcloud

C. Fix `/etc/php/php.ini`

(I didn't realize that PHP 8 had overwritten my php.ini file so I had to manually enable modules again.)

extension=bcmath
extension=bz2 
extension=exif
extension=gd
extension=gmp
extension=iconv
extension=imap
extension=intl
zend_extension=opcache
extension=pdo_mysql 

I also had to set the PHP Memory limit above 512M to make occ stop complaining

memory_limit = 1024M

Comment Out

;output_buffering = 4096

Disable Output_Buffering

output_buffering = Off

OPCache settings

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=1
opcache.save_comments=1

To get imagick working

pacman -S php-imagick

Edit `/etc/php/conf.d/imagick.ini` -- uncomment to:

extension=imagick
imagick.skip_version_check=1

D. Debugging

(And then each error cleared up from the following command)

sudo -u http /usr/share/webapps/nextcloud/occ update:check

Nextcloud also gives optimization / debugging info @

https://nextcloud.mydomain.com/index.ph … n/overview

E. My `httpd.conf`
My `/etc/httpd/conf/httpd.conf` php include looks like:

# PHP 8.x:
LoadModule php_module modules/libphp.so
AddHandler php-script .php
Include conf/extra/php_module.conf

F. Extra - `vhost` example `/etc/httpd/conf/sites-available/nextcloud-mydomain-com.conf`

(I'm using a custom sites-available httpd .conf that I wrote / modded myself -- incase that helps anyone it looks like this:)

<IfModule mod_alias.c>
        Alias /nextcloud /usr/share/webapps/nextcloud/
</IfModule>

<Directory /usr/share/webapps/nextcloud/>
        Options +FollowSymlinks
        AllowOverride all
        Require all granted
        php_admin_value open_basedir "/home/:/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/nextcloud/:/var/lib/nextcloud/:/etc/webapps/nextcloud/:/home/nextcloud/:/nextcloud/"
        
        <IfModule mod_dav.c>
                Dav off
        </IfModule>
        
        SetEnv HOME /usr/share/webapps/nextcloud
        SetEnv HTTP_HOME /usr/share/webapps/nextcloud
</Directory>

<VirtualHost *:80>
        ServerAdmin me@mydomain.com
        
        # Redirect to HTTPS
        ServerName nextcloud.mydomain.com
        Redirect permanent / https://nextcloud.mydomain.com/

        #ServerName nextcloud.mydomain.com
        #ServerAlias *.mydomain.com
        
        #DirectoryIndex index.php index.html
        #DocumentRoot /usr/share/webapps/nextcloud
        
        # Log files
        ErrorLog  /home/nextcloud/nextcloud.mydomain.com/logs/error.log
        CustomLog /home/nextcloud/nextcloud.mydomain.com/logs/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =nextcloud.mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
        ServerAdmin me@mydomain.com
        ServerName nextcloud.mydomain.com
        #ServerAlias *.mydomain.com
        
        DirectoryIndex index.php index.html
        DocumentRoot /usr/share/webapps/nextcloud
        

        # This is no longer necessary, BTRFS Subvolume /NextCloud now mounts to /usr/share/webapps/nextcloud and /nextcloud rsync, snapshotting and other purposes which includes all the webapp+data files (config files seperate)
        #DocumentRoot /nextcloud

        # Log files
        ErrorLog  /home/nextcloud/nextcloud.mydomain.com/logs/error.log
        CustomLog /home/nextcloud/nextcloud.mydomain.com/logs/access.log combined
        
        <IfModule mod_headers.c>
                Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
        </IfModule>
        
        SSLEngine on
        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
</VirtualHost>

G. Database Upgrade

Next Step Requires Websites be brought offline (should we also enter maintenance mode?)

sudo -u http /usr/share/webapps/nextcloud/occ maintenance:mode --on
sudo systemctl stop httpd.service

(ONLY WHILE INSTANCE IS OFFLINE)

sudo -u http /usr/share/webapps/nextcloud/occ db:add-missing-columns
sudo -u http /usr/share/webapps/nextcloud/occ db:add-missing-indices
sudo -u http /usr/share/webapps/nextcloud/occ db:convert-filecache-bigint 

Bring back online

sudo systemctl start httpd.service
sudo -u http /usr/share/webapps/nextcloud/occ maintenance:mode --off

https://aur.archlinux.org/packages/next … md-timers/

paru -S nextcloud-systemd-timers nextcloud-app-previewgenerator

I hope this helps others get out of this v21.0 mess, thanks @all for their info

Last edited by ElectricPrism (2021-03-02 21:13:50)

Offline

#83 2021-03-02 18:31:34

doragasu
Member
Registered: 2012-03-03
Posts: 144

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

@ElectricPrism: Great step by step explanation, thanks!

One question, are you using the TOTP plugin? Is it working for you? I also got my setup working with PHP8, but trying to enable the TOTP plugin fails.

Offline

#84 2021-03-03 12:13:23

str0gg
Member
Registered: 2012-12-01
Posts: 60
Website

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

doragasu wrote:

@ElectricPrism: Great step by step explanation, thanks!

One question, are you using the TOTP plugin? Is it working for you? I also got my setup working with PHP8, but trying to enable the TOTP plugin fails.

I've spoken with totp plugin developer, check if you have secret in config.php

2FA is working for me :-)

Offline

#85 2021-03-03 17:46:27

dogo77
Member
Registered: 2010-06-08
Posts: 15

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

str0gg wrote:

@kde35 unfortunately I tried... script to fix permissions


unfortunately, i did the same. thanks for your script!
but i still get error 403 (forbidden) when accessing the my nextcloud url.

in the /var/log/nginx/error.log there is a lot of:

[error] 470#470: *9 "/usr/share/webapps/nextcloud/index.php" is forbidden (13: Permission denied), 

i tried to catch any relevant dir in /etc/systemd/system/php-fpm.service.d/override.conf

[Service]

ReadWritePaths = /etc/webapps/nextcloud/
ReadWritePaths = /etc/webapps/nextcloud/config

ReadWritePaths = /usr/share/webapps/nextcloud/
ReadWritePaths = /usr/share/webapps/nextcloud/apps
ReadWritePaths = /usr/share/webapps/nextcloud/data
ReadWritePaths = /usr/share/webapps/nextcloud/config
ReadWritePaths = /usr/share/webapps/nextcloud/lib
ReadWritePaths = /var/lib/nextcloud/apps
ReadWritePaths = /var/lib/nextcloud/data

# Replace the following path with the Nextcloud data directory
ReadWritePaths = /var/lib/nextcloud
ReadWritePaths = /var/nextcloud/

but error remains.
any hints?
(besides: don't you ever upgrade nextcloud until it is written in big red letters on arch homepage! wink )

Offline

#86 2021-03-03 18:55:40

dogo77
Member
Registered: 2010-06-08
Posts: 15

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

EDIT
that error came because somehow 'version' => '21.0.0.18', was deleted from /etc/webapps/nextcloud/config/config.php
after re-entering this i got NC up and running again.
Thanks for this Thread

(would have deleted my 2 replies, but maybe someone encounteres the same error someday…)

ok, i managaged to get a little further by strictly following the wiki ans setting things step-by-step (although user http is sometimes still used.i dunno whether to change this…)

i disabled maintainance-mode with

sudo -u nextcloud php /usr/share/webapps/nextcloud/occ maintenance:mode --off

web-ui loaded and offered an update to NC21…clicked that an i get the error
Exception: Updates between multiple major versions and downgrades are unsupported.
:\
tried it with occ

sudo -u nextcloud php /usr/share/webapps/nextcloud/occ upgrade
Setting log level to debug
Turned on maintenance mode
{"reqId":"S7AB5bWGPpvorZLJNPKV","level":3,"time":"2021-03-03T18:53:52+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":{"Exception":"Error","Message":"fopen(/var/log/nextcloud/nextcloud.log): Failed to open stream: Permission denied at /usr/share/webapps/nextcloud/lib/private/Log/File.php#85","
…
…
…
Exception: Updates between multiple major versions and downgrades are unsupported.

i'm clueless

Last edited by dogo77 (2021-03-03 19:38:04)

Offline

#87 2021-03-05 16:38:00

mathes.s
Member
Registered: 2021-03-05
Posts: 1

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Just my two configuration cents how I got nextcloud working again.

I am still using the Version 21 with php7, php8 is installed so the package seems to be satisfied. Otherwise my setup is with apache and php-fpm. Only difference is that I moved the "data" directory directly to my btrfs-filesystem in "/mnt/data".

In my httpd.conf I have the following:

LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

...

#LoadModule php7_module modules/libphp7.so
#AddHandler php-script .php

...

# Nextcloud Config
Include conf/extra/nextcloud.conf

# Include php-fpm7
Include conf/extra/php7-fpm.conf

In "conf/extra/nextcloud.conf" I removed any "php_admin_value" and added, as recommend by someone:

<VirtualHost *:443>
...
   <FilesMatch \.php$> 
        SetHandler "proxy:unix:/run/nextcloud/nextcloud.sock|fcgi://localhost/"   
   </FilesMatch>
...
</VirtualHost>

The "conf/extra/php7-fpm.conf" looks like this, and haven't tried to remove it, as it is maybe duplicated to the one above:

DirectoryIndex index.php index.html
<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/nextcloud/nextcloud.sock|fcgi://localhost/"
</FilesMatch>

The "/etc/php7/php-fpm.conf" is the default one as far as I can see it.

I added a "/etc/php7/php-fpm.d/nextcloud.conf" with the following, here was an error in the end that "pm.max_children" must atleast as big as "pm.max_spare_servers"

nextcloud]
user = nextcloud
group = nextcloud
listen = /run/nextcloud/nextcloud.sock
listen.owner = http
listen.group = http
chdir = /usr/share/webapps/nextcloud
pm = dynamic
pm.max_children = 3
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

php_admin_value['open_basedir'] = /tmp/:/usr/share/webapps/nextcloud/:/etc/webapps/nextcloud/:/usr/bin/doveadm:/var/cache/nextcloud:/var/lib/nextcloud:/mnt/data:/var/log/nextcloud

The rest is also as descripted with the systemctl overrides and the split of the directories as introduced in Version 21.

Maybe that helps someone.

BG Mathes

Offline

#88 2021-03-06 17:09:19

anarki@buttereblume
Member
Registered: 2015-12-29
Posts: 17

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Successfully running nextcloud-21.0.0-9 with php-8.0.2-1, php-fpm-8.0.2-1

Nextcloud root: /usr/share/webapps/nextcloud with symlinks
/data -> /etc/webapps/nextcloud/data
/config -> /etc/webapps/nextcloud/config
/wapps - > /etc/webapps/nextcloud/apps

I also added via systemctl edit php-fpm.service:
ReadWritePath /etc/webapps/nextcloud

After upgrading from nextcloud-20 and php-7, apart from php7 <-> php configuration issues, my configuration suffered from access rights to /data and /config. As I understand, the packet maintains the following:
nextcloud root: root:root 755 / 644
nextcloud config: http:http 750 / 640
nextcloud data: nextcloud:nextcloud 750 / 640

Having any directory within /etc/webapps/nextcloud set to http:http, nextcloud works as expected. Setting /data to nextcloud:nextcloud results in access errors.

Also, some timer or hook automatically sets /data to nextcloud:nextcloud, so I have to put it back to http:http manually. I still havn't figured out the reason for this, but it occurs after some days, usually.

Last edited by anarki@buttereblume (2021-03-06 17:43:33)

Offline

#89 2021-03-08 06:42:45

str0gg
Member
Registered: 2012-12-01
Posts: 60
Website

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Guys please vote https://bugs.archlinux.org/task/69911 I've create task with configuration snipe so we wont need to constantly fix permissions on updates.

Offline

#90 2021-03-09 09:20:44

Black-Byte
Member
Registered: 2021-03-09
Posts: 1

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

I've got it working. Cause some other Webservices where i need php7 i switched back to mod_php7 (i had no interest to run it via fcgi)

i chown all Nextcloud folders (/usr/share/webapps/nextcloud, /etc/webapps/nextcloud/data, /etc/webapps/nextcloud/config,/etc/webapps/nextcloud/apps) back to user http.
combine the old config.php with the new one
Add to /etc/enviroment the line NEXTCLOUD_USER="http"

now its running. but nextcloud hase some minor bugs in his checkup that i will do next

Offline

#91 2021-03-09 17:58:25

anarki@buttereblume
Member
Registered: 2015-12-29
Posts: 17

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

There is a systemd configuration file /usr/lib/tmpfiles.d/nexcloud.conf that is evaluated ocasionally, e.g. after certain pacman actions. It sets the ownership of /etc/webapps/nextcloud/config to nextcloud:nextcloud.

Although that makes sense, since the contents of /config should be rwxable by php running as nextcloud user, but not by http oder any other user, it effectively hinders my nextcloud installation from reading /config. So I altered the first line to:

Z /etc/webapps/nextcloud/config - http http

For anyone else who wants to give it a try, do a chown http:http /etc/webapps/nextcloud/config before editing the configuration file.

Still figuring out if and why php runs as the wrong user (http) on my system.

Offline

#92 2021-03-10 09:26:58

Webbeh
Member
Registered: 2012-07-08
Posts: 49

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Anyone else got the following error ?

`    Module php-imagick in this instance has no SVG support. For better compatibility it is recommended to install it. `

And if so...

..anyone knows how to get rid of it ?

Offline

#93 2021-03-10 09:58:06

f1t3
Member
Registered: 2019-06-18
Posts: 2

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Webbeh wrote:

Anyone else got the following error ?

`    Module php-imagick in this instance has no SVG support. For better compatibility it is recommended to install it. `

Install librsvg.

Offline

#94 2021-03-12 00:39:44

freaz
Member
Registered: 2015-07-06
Posts: 1

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

After struggling with all sorts of issues for a month now, ever since the php7 switch hit, I've finally resorted to just editing my passwd file and changing the nextcloud user ID to 33 (same as http user), and changing all the file ownerships back to http user (which is now also the nextcloud user). This sadly ridiculous "solution" is proving better for my mental health than trying to track down and deal with temp.d files, and battling occ vs web server trying to own things, and all of the confusion of this long thread. I was about to dump the arch package and just do a manual install (after for a while contemplating going all docker), when I realised all I'd be doing really is running the same nextcloud stuff, and creating my own cron/timers to run as http.. so why not just butcher the passwd file for the same effect? It feels so bad and yet so good, at the same time.

Offline

#95 2021-03-15 06:34:24

str0gg
Member
Registered: 2012-12-01
Posts: 60
Website

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

is talk with video calls works for you?

Offline

#96 2021-03-21 23:56:30

SeeSpotRun
Member
Registered: 2014-06-14
Posts: 2

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

miro279 wrote:

I'm getting a server error after the update (running arch Linux arm):
...
/var/log/nginx/error.log shows some errors related to fastcgi...
...
I'm not a php expert at all, any ideas what to do?

Just stumbled across some similar problems.  Running arch, nginx, php-fpm and fastcgi.

The problem was my nginx nextcloud.conf was pointing fastcgi at the wrong socket:

fastcgi_pass                    unix:/run/php-fpm/php-fpm.sock

needed to be changed to:

fastcgi_pass                    unix:/run/nextcloud/nextcloud.sock

Which makes sense, because php-fpm.sock is running as http user, not nextcloud.

Offline

#97 2021-03-22 16:37:41

kde35
Member
Registered: 2015-04-13
Posts: 65

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

str0gg wrote:

is talk with video calls works for you?

When I tried updating Nextcloud, with all the issues I had, spread/talk was working fine.  But it was nexcloud 21.0.0-4, and I haven't retried yet with newer version.

Offline

#98 2021-03-23 17:28:10

raneon
Member
Registered: 2013-11-02
Posts: 51

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

After upgrading to Nextcloud 21.0.9, the file viewer page shows in Firefox only a blank page. The blue top main panel is visible, the left panel as well, the recent files too, but there are no files/folders shown. The strange thing is, it works in Falkon. Did somebody experience the same issue?

Offline

#99 2021-03-24 10:07:56

sweetthdevil
Member
Registered: 2009-10-20
Posts: 396

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Hello there,

I have been trying to get Nextcloud to work on a new server and I am struggling like hell! I followed the wiki three times now and always run into the same issue.

Would it be possible to update the wiki for a full step by step from scratch on setting it up with Apache ideally? I know it's a long shot...

Offline

#100 2021-03-24 17:55:30

sweetthdevil
Member
Registered: 2009-10-20
Posts: 396

Re: Nextcloud 21.0.0.2-21.0.0.9 sevral issues, index in first post

Right, spend all day on it again - now it's been 4 days!

But I managed to get Nextcloud up and running, BUT everytime to server is rebooted I end up with permission issues and need to run the following two commands to be gain access again.

sudo chown -R http:http /etc/webapps/nextcloud/
sudo chown -R http:http /var/lib/nextcloud/apps

How to resolve it? Surely there is a proper options rather than using a bash script at startup?

Offline

Board footer

Powered by FluxBB