Nethserver's Nextcloud is missing tools for massimport

NethServer Version: 7.5.1804
Module: Nextcloud 13

I tried to import several big chunks of data into the nethserver’s nextcloud.
While pushing it by FTP and then moving it to the correct directory works without issues. I cannt start the import, because all the usual tools are… gone.

I use the how-to from

an neither occ, nor the console.php are there accourding to the “whereis”.

Any idea where they went?

Kind regards,

No, neither of them is in the path.

[root@neth ~]# find / -name occ

Nethserver’s developer manual has this example for occ:

su - apache -s /bin/bash -c "source /opt/rh/rh-php71/enable; cd /usr/share/nextcloud/; php occ ldap:show-config"

This is the commands i issue to nextcloud when i upload huge files to nextcloud via sftp

sudo chown -R apache:apache /var/lib/nethserver/nextcloud

sudo -u apache /opt/remi/php73/root/usr/bin/php /usr/share/nextcloud/occ files:scan --all

sudo -u apache /opt/remi/php73/root/usr/bin/php /usr/share/nextcloud/occ files:cleanup

obviously replacing what version of php you are using to maybe 72 from 73

oh and if you do the .htaccess upload workaround / hack after you edit the needed files to upload .htaccess files you need to run the following or it will return server error

sudo -u apache /opt/remi/php73/root/usr/bin/php /usr/share/nextcloud/occ maintenance:update:htaccess

Thank you :slight_smile:
However on a vanilla system (php 5)it throws the error

[root@my ~]# sudo -u apache php /usr/share/nextcloud/occ files:scan --all
PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /usr/share/nextcloud/console.php on line 93

and after installing php 7.3 from remi I get an

PHP Fatal error: Class ‘PDO’ not found in /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 172

Guees it’s easier to do a move to a mounted webdav and let nextcloud do the work :confused:

Kind regards,

that does not work you have to write the whole file path of your php like the following if you are using remi 7.3 you should beable to copy my the following

sudo -u apache /opt/remi/php73/root/usr/bin/php /usr/share/nextcloud/occ files:scan --all


sudo -u apache /opt/remi/php73/root/usr/bin/php /usr/share/nextcloud/occ files:cleanup

make sure there is the following file


if not append to your php file

also when you initiate the first command it takes a long while if you have a big data set to find the files if nothing happens or it looks frozen its not mine took over 3 hrs to find all the files

Thank you for your swift reply :slight_smile:

Unfortunatly, it didn’t directly change the outcome.
Since it is apparent, that the PDO is missing, I added

and increasing the memory limit to 512MB

to the mix, and voila… it worked… sort of :smiley:
now I can index my newly added files, but when I open the nexcloud webpage it throws a


404 - Language not found


Why can’t things ever be easy :smiley:
Ill try to uninstall the 7.3 once the scan is through and see if that removed the error …

Thank s a ton!

Kind regards,

looks like to me you have been installing packages not from the neth repos.

Problem is if you install a package that was not meant for nethserver let’s say httpd 2.4.7 it overwrites all httpd files plus all dependencies so you have to reinstall them again

i have installed katello / foreman and i had to do a yum reinstall nethserver-httpd* and php* just to get the required dependencies to make it work again

1 Like