Matériel: Public Cloud acheté en ligne
**Version de YunoHost:4.2.8.3 J’ai accès à mon serveur : En SSH Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Error using the command sudo -u nextcloud php7.3 occ on the nextcloud directory
I am using the nextcloud version 22.1.1~ynh1. I have an permission error when trying to use the occ command
$ cd /var/www/nextcloud
/var/www/nextcloud$ sudo -u nextcloud php7.3 occ list
[sudo] password for admin:
Sorry, user admin is not allowed to execute '/usr/bin/php7.3 occ' as nextcloud on mydomain.tld.
I also try logged as root
/var/www/nextcloud# sudo -u nextcloud php7.3 occ list
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
What’s going wrong ? Perhaps I need stop nginx before use this command ?
I have edit the file /etc/php/7.3/mods-available/apcu.ini adding this line apc.enable_cli=1 and it works (using root)
I discover also this issue here Script et erreur PHP module local cache with another way to resolve the issue editing /etc/php/7.3/cli/php.ini in fact of /etc/php/7.3/mods-available/apcu.ini with the same line
Now the first permissions error is still here, I can’t use the user admin to use occ command…
/var/www/nextcloud$ ls -al
total 164
drwxr-xr-x 13 nextcloud nextcloud 4096 Sep 10 23:44 .
drwxr-xr-x+ 8 root root 4096 Oct 9 14:54 ..
drwxr-xr-x 43 nextcloud nextcloud 4096 Aug 26 15:27 3rdparty
drwxr-xr-x 61 nextcloud nextcloud 4096 Oct 9 14:45 apps
-rw-r--r-- 1 nextcloud nextcloud 19327 Aug 26 15:24 AUTHORS
drwxr-xr-x 2 nextcloud nextcloud 4096 Sep 10 23:44 config
-rw-r--r-- 1 nextcloud nextcloud 3924 Aug 26 15:24 console.php
-rw-r--r-- 1 nextcloud nextcloud 34520 Aug 26 15:24 COPYING
drwxr-xr-x 22 nextcloud nextcloud 4096 Aug 26 15:28 core
-rw-r--r-- 1 nextcloud nextcloud 5163 Aug 26 15:24 cron.php
-rw-r--r-- 1 nextcloud nextcloud 2836 Sep 10 23:44 .htaccess
-rw-r--r-- 1 nextcloud nextcloud 156 Aug 26 15:24 index.html
-rw-r--r-- 1 nextcloud nextcloud 3454 Aug 26 15:24 index.php
drwxr-xr-x 6 nextcloud nextcloud 4096 Aug 26 15:24 lib
-rw-r--r-- 1 nextcloud nextcloud 283 Aug 26 15:24 occ
drwxr-xr-x 2 nextcloud nextcloud 4096 Aug 26 15:24 ocm-provider
drwxr-xr-x 2 nextcloud nextcloud 4096 Aug 26 15:24 ocs
drwxr-xr-x 2 nextcloud nextcloud 4096 Aug 26 15:24 ocs-provider
-rw-r--r-- 1 nextcloud nextcloud 3139 Aug 26 15:24 public.php
-rw-r--r-- 1 nextcloud nextcloud 5340 Aug 26 15:24 remote.php
drwxr-xr-x 4 nextcloud nextcloud 4096 Aug 26 15:24 resources
-rw-r--r-- 1 nextcloud nextcloud 26 Aug 26 15:24 robots.txt
-rw-r--r-- 1 nextcloud nextcloud 2452 Aug 26 15:24 status.php
drwxr-xr-x 3 nextcloud nextcloud 4096 Aug 26 15:24 themes
drwxr-xr-x 2 nextcloud nextcloud 4096 Aug 26 15:25 updater
-rw-r--r-- 1 nextcloud nextcloud 101 Aug 26 15:24 .user.ini
-rw-r--r-- 1 nextcloud nextcloud 402 Aug 26 15:27 version.php
Using the modifications to apcu.ini described above, I was able to trigger a scan (as root su’ing as nextcloud, but not as admin.)
Seems like this documentation needs to updated:
Near the section where it asks one to scan.
I would do it - but I still got an error: “Home storage for user x not writable Make sure you’re running the scan command only as the user the web server runs as” for most of my users - not sure why.