Hello everybody,
I had an owncloud 9 installation on my Kubuntu 16.04 installed from repo up and running
with sqlite.
Now I want to change to nextcloud 11.0.2
I first removed the owncloud repository installation with synaptic.
Renamed my old /var/www/owncloud dir to /var/www/nextcloud and copied all the files into it.
Now I am stuck at the point that I can not open the occ file:
Did you manage to find a solution to this? I just migrated from Nextcloud 10 to Nextcloud 12, and am stuck at exactly the same point⊠And yes, I am executing this - like you - in the nextcloud folderâŠ
Seems to be a php-related problem (executing occ without sudo and php in front works, but throws the error that I need to execute occ as user www-data; but as www-data, I get âCould not open input file: occâ), but I canât figure out, what it isâŠ
Edit: Well, maybe not a php problem. After going back to Nextcloud 10, everything works again�!
I found the solution: I had executed the chown -R www-data:www-data step from within the nextcloud folder with * - this omits changing the owner for all hidden files (starting with .). Apache thus was not able to access .htaccess when occ should be run. chown -R www-data:www-data .* resolved the problem.
I managed to get a solution here with Nextcloud 15 Beta. Hope this helps someone out.
First, Iâm running Ngnix so I had to get the user account to run this under (nginx).
Then I had to install the php-process package via yum. Iâm running PHP 7.2 with Nextcloud, and it wasnât installed by default.
Then I had to cd to the folder in order to run it (/var/www/nextcloud for me).
Finally I could run the command like this successfully:
sudo -u nginx php occ files:scan [username] -v
This worked just fine, after I had deleted everything from the userâs folder and then rescanned it. Now I will rsync over their data from backup, rescan again, and should have the content back.
This answer was very helpful to me. I was trying to enter the maintenance mode and was getting Could not open input file: occ error. My occ file is in /srv/nextcloud. Changing directory to /srv/nextcloud and re-running the same command fixes the problem.