eehmke
November 30, 2018, 1:29pm
#2
The web updater hangs and does nothing after pressing the “Start update” button.
1 Like
This is solved with this version, but unfortunately only from upgrades afterwards. This you need to run the updater from the updater/ folder: php updater.phar. This does the same as the web based updater.
1 Like
eehmke
November 30, 2018, 2:12pm
#4
Thank you, that worked. I had to remove that .rnd file, though
1 Like
Scrat
December 1, 2018, 6:04pm
#5
How do you run that in a console window? My host is FreeNAS based.
iocage console nextcloud
… I just don’t know how to execute it from there.
Thanks in advance!
eehmke
December 1, 2018, 6:13pm
#6
Can you start a console at all? The commands would be:
cd /var/www/nextcloud
sudo -u www-data php updater.phar
You must change this commands for your actual path and the owner of that directory.
1 Like
Scrat
December 1, 2018, 7:04pm
#7
I went to the folder the file is in, ran the command, but no hint of activity shows. What gives?
sudo -u root php updater.phar
eehmke
December 1, 2018, 9:28pm
#8
There must be some error messages. The updater.phar is in the updater subdirectory, so you have to cd there to make it run.
Scrat
December 1, 2018, 9:31pm
#9
I went to the subdirectory it’s in, ran the command above… but there was no reaction. I ran locate *.rnd
to look for a file that caused you issues, but locate came up empty.
eehmke
December 1, 2018, 9:53pm
#10
If you can run the command, and there is no reaction, there is something wrong. Does it show a command prompt again? What does
ls -l
show in the nextcloud directory?
Scrat
December 1, 2018, 9:56pm
#11
[root@nextcloud ~]# cd /usr/local/www/apache24/data/nextcloud/updater/
[root@nextcloud /usr/local/www/apache24/data/nextcloud/updater]# sudo -u root php updater.phar
[root@nextcloud /usr/local/www/apache24/data/nextcloud/updater]#
Navigate, run, result.
ls -l:
[root@nextcloud /usr/local/www/apache24/data/nextcloud/updater]# ls -l
total 251
-rw-r--r-- 1 www www 62871 Nov 16 22:07 index.php
-rw-r--r-- 1 www www 598970 Nov 16 22:07 updater.phar
eehmke
December 1, 2018, 10:00pm
#12
Running the command as root is wrong. You need to run it as the user that runs the web server, and this user should own the directory. That’s why I asked for the result of
ls -l
Scrat
December 1, 2018, 10:01pm
#13
Pretty sure that root shows there cause of ssh root@IP
eehmke
December 1, 2018, 10:08pm
#14
No. Just when you log in as root that does not mean that folder is owned by root, and it should not. Try to check what user is used by the web server (apache?) on your system. On a Debian system that would be www-data. Because I do not know your system, I cannot tell.
You might run:
ps aux | grep apache
to get a list of the apache processes. In the left row, you see the user.
Scrat
December 1, 2018, 10:12pm
#15
[root@nextcloud /usr/local/www/apache24/data/nextcloud/updater]# ps aux | grep apache
root 47894 0.0 0.0 6660 2052 0 S+J 16:10 0:00.00 grep apache
Scrat
December 1, 2018, 10:19pm
#16
Edit /etc/motd to change this login announcement.
[root@nextcloud ~]# ls -la
total 57
drwxr-xr-x 2 root wheel 8 Oct 7 00:47 .
drwxr-xr-x 18 root wheel 22 Aug 30 21:08 ..
-rw------- 1 root wheel 1242 Dec 1 16:15 .bash_history
-rw-r--r-- 2 root wheel 957 Jun 21 23:34 .cshrc
-rw-r--r-- 1 root wheel 149 Jun 21 23:34 .k5login
-rw-r--r-- 1 root wheel 395 Jun 21 23:34 .login
-rw-r--r-- 1 root wheel 70 Sep 23 19:02 .my.cnf
-rw-r--r-- 2 root wheel 474 Jun 21 23:34 .profile
[root@nextcloud ~]# cd /usr/local/www/apache24/data/nextcloud/updater/
[root@nextcloud /usr/local/www/apache24/data/nextcloud/updater]# ls -la
total 264
drwxr-xr-x 2 www www 4 Sep 6 02:43 .
drwxr-xr-x 15 www www 29 Nov 16 22:07 ..
-rw-r--r-- 1 www www 62871 Nov 16 22:07 index.php
-rw-r--r-- 1 www www 598970 Nov 16 22:07 updater.phar
[root@nextcloud /usr/local/www/apache24/data/nextcloud/updater]#
Is it even being allowed to run? (r= read, w= write, x= execute?)
eehmke
December 1, 2018, 10:25pm
#17
So the directory is owned by user www. Thats fine, check if the directory
/usr/local/www/apache24/data/nextcloud
is also owned by www. Then try (in the updater directory):
sudo -u www php updater.phar
Any results?
Scrat
December 1, 2018, 10:29pm
#18
updater.phar information is in my last post. Nextcloud folder:
[root@nextcloud /usr/local/www/apache24/data/nextcloud]# ls -la
total 208
drwxr-xr-x 15 www www 29 Nov 16 22:07 .
drwxr-xr-x 3 root wheel 4 Sep 23 19:00 ..
-rw-r--r-- 1 www www 4070 Nov 16 22:12 .htaccess
-rw-r--r-- 1 www www 161 Nov 16 22:12 .user.ini
drwxr-xr-x 32 www www 40 Nov 16 22:07 3rdparty
-rw-r--r-- 1 www www 12063 Nov 16 22:07 AUTHORS
-rw-r--r-- 1 www www 34520 Nov 16 22:07 COPYING
drwxr-xr-x 64 www www 64 Dec 1 13:16 apps
drwxr-xr-x 2 www www 6 Nov 16 22:07 config
-rw-r--r-- 1 www www 3650 Nov 16 22:07 console.php
drwxr-xr-x 18 www www 25 Nov 16 22:07 core
-rw-r--r-- 1 www www 4979 Nov 16 22:07 cron.php
drwxr-xr-x 2 www www 4 Sep 23 19:02 data
-rw-r--r-- 1 www www 156 Nov 16 22:07 index.html
-rw-r--r-- 1 www www 3172 Nov 16 22:07 index.php
drwxr-xr-x 6 www www 9 Nov 16 22:07 lib
-rw-r--r-- 1 www www 283 Nov 16 22:07 occ
drwxr-xr-x 2 www www 3 Nov 16 22:07 ocm-provider
drwxr-xr-x 2 www www 5 Nov 16 22:07 ocs
drwxr-xr-x 2 www www 3 Nov 16 22:07 ocs-provider
-rw-r--r-- 1 www www 2969 Nov 16 22:07 public.php
-rw-r--r-- 1 www www 5139 Nov 16 22:07 remote.php
drwxr-xr-x 4 www www 7 Nov 16 22:07 resources
-rw-r--r-- 1 www www 26 Nov 16 22:07 robots.txt
drwxr-xr-x 12 www www 18 Nov 16 22:07 settings
-rw-r--r-- 1 www www 2232 Nov 16 22:07 status.php
drwxr-xr-x 3 www www 4 Nov 16 22:07 themes
drwxr-xr-x 2 www www 4 Sep 6 02:43 updater
-rw-r--r-- 1 www www 349 Nov 16 22:07 version.php
[root@nextcloud /usr/local/www/apache24/data/nextcloud]#
eehmke
December 1, 2018, 10:38pm
#20
That looks good. Now try the update command with the www user.