Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
how i can resolve?
You can do what Basil told you to do: attach the complete nextcloud.log. He told you how to get it, too (as do I in the README).
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
Code:
root@truenas[~/freenas-iocage-nextcloud]# ls -lR
total 54
drwxr-xr-x  8 root  wheel     13 Aug  9 22:41 .git
-rw-r--r--  1 root  wheel     66 Aug  9 22:41 .gitignore
drwxr-xr-x  2 root  wheel      2 Aug 11 03:02 includes
-rw-r--r--  1 root  wheel  35147 Aug  9 22:41 LICENSE
-rw-r--r--  1 root  wheel    417 Aug 16 21:40 nextcloud-config
-rwxr-xr-x  1 root  wheel  22263 Aug 11 23:02 nextcloud-jail.sh
-rw-r--r--  1 root  wheel  31308 Aug 16 21:52 nextcloud.log
-rw-r--r--  1 root  wheel  13583 Aug  9 22:41 README.md

./.git:
total 9
drwxr-xr-x  2 root  wheel     2 Aug  9 22:41 branches
-rw-r--r--  1 root  wheel   275 Aug  9 22:41 config
-rw-r--r--  1 root  wheel    73 Aug  9 22:41 description
-rw-r--r--  1 root  wheel    23 Aug  9 22:41 HEAD
drwxr-xr-x  2 root  wheel    14 Aug  9 22:41 hooks
-rw-r--r--  1 root  wheel  1524 Aug  9 22:41 index
drwxr-xr-x  2 root  wheel     3 Aug  9 22:41 info
drwxr-xr-x  3 root  wheel     4 Aug  9 22:41 logs
drwxr-xr-x  4 root  wheel     4 Aug  9 22:41 objects
-rw-r--r--  1 root  wheel   194 Aug  9 22:41 packed-refs
drwxr-xr-x  5 root  wheel     5 Aug  9 22:41 refs

./.git/branches:
total 0

./.git/hooks:
total 22
-rwxr-xr-x  1 root  wheel   478 Aug  9 22:41 applypatch-msg.sample
-rwxr-xr-x  1 root  wheel   896 Aug  9 22:41 commit-msg.sample
-rwxr-xr-x  1 root  wheel  4661 Aug  9 22:41 fsmonitor-watchman.sample
-rwxr-xr-x  1 root  wheel   189 Aug  9 22:41 post-update.sample
-rwxr-xr-x  1 root  wheel   424 Aug  9 22:41 pre-applypatch.sample
-rwxr-xr-x  1 root  wheel  1643 Aug  9 22:41 pre-commit.sample
-rwxr-xr-x  1 root  wheel   416 Aug  9 22:41 pre-merge-commit.sample
-rwxr-xr-x  1 root  wheel  1348 Aug  9 22:41 pre-push.sample
-rwxr-xr-x  1 root  wheel  4885 Aug  9 22:41 pre-rebase.sample
-rwxr-xr-x  1 root  wheel   544 Aug  9 22:41 pre-receive.sample
-rwxr-xr-x  1 root  wheel  1453 Aug  9 22:41 prepare-commit-msg.sample
-rwxr-xr-x  1 root  wheel  3635 Aug  9 22:41 update.sample

./.git/info:
total 1
-rw-r--r--  1 root  wheel  240 Aug  9 22:41 exclude

./.git/logs:
total 2
-rw-r--r--  1 root  wheel  188 Aug  9 22:41 HEAD
drwxr-xr-x  4 root  wheel    4 Aug  9 22:41 refs

./.git/logs/refs:
total 1
drwxr-xr-x  2 root  wheel  3 Aug  9 22:41 heads
drwxr-xr-x  3 root  wheel  3 Aug  9 22:41 remotes

./.git/logs/refs/heads:
total 1
-rw-r--r--  1 root  wheel  188 Aug  9 22:41 master

./.git/logs/refs/remotes:
total 1
drwxr-xr-x  2 root  wheel  3 Aug  9 22:41 origin

./.git/logs/refs/remotes/origin:
total 1
-rw-r--r--  1 root  wheel  188 Aug  9 22:41 HEAD

./.git/objects:
total 10
drwxr-xr-x  2 root  wheel  2 Aug  9 22:41 info
drwxr-xr-x  2 root  wheel  4 Aug  9 22:41 pack

./.git/objects/info:
total 0

./.git/objects/pack:
total 13858
-r--r--r--  1 root  wheel     22996 Aug  9 22:41 pack-cde9ebb8e7ee9bbcecb4e0585e0b35cd12d57b9b.idx
-r--r--r--  1 root  wheel  14156739 Aug  9 22:41 pack-cde9ebb8e7ee9bbcecb4e0585e0b35cd12d57b9b.pack

./.git/refs:
total 2
drwxr-xr-x  2 root  wheel  3 Aug  9 22:41 heads
drwxr-xr-x  3 root  wheel  3 Aug  9 22:41 remotes
drwxr-xr-x  2 root  wheel  2 Aug  9 22:41 tags

./.git/refs/heads:
total 1
-rw-r--r--  1 root  wheel  41 Aug  9 22:41 master

./.git/refs/remotes:
total 1
drwxr-xr-x  2 root  wheel  3 Aug  9 22:41 origin

./.git/refs/remotes/origin:
total 1
-rw-r--r--  1 root  wheel  32 Aug  9 22:41 HEAD

./.git/refs/tags:
total 0

./includes:
total 0
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

xames

Patron
Joined
Jun 1, 2020
Messages
235
When i try to assign a folder for my nextcloud user on the freenas it says read only, how i can change permisions to allow me write on a dedicated pool for that? Thanks.
 

markymark832

Dabbler
Joined
Feb 28, 2017
Messages
36
hello everyone, my nextcloud via a jail has been fine, it's been off for a month or so, i come to get it all back on and updated ( via the web gui and it fails)

  • Initializing
    Current version is 15.0.5.
    Update to Nextcloud 16.0.11 available. (channel: "stable")
    Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-16.0.11.zip
    Retry update
  • Check for expected files
  • Check for write permissions
    The following places can not be written to:
    • /var/www/nextcloud/updater/../AUTHORS
    • /var/www/nextcloud/updater/../robots.txt
    • /var/www/nextcloud/updater/../index.php
    • /var/www/nextcloud/updater/../public.php
    • /var/www/nextcloud/updater/../remote.php
    • /var/www/nextcloud/updater/../occ
    • /var/www/nextcloud/updater/../.htaccess
    • /var/www/nextcloud/updater/../.user.ini
    • /var/www/nextcloud/updater/../COPYING
    • /var/www/nextcloud/updater/../version.php
    • /var/www/nextcloud/updater/../cron.php
    • /var/www/nextcloud/updater/../index.html
    • /var/www/nextcloud/updater/../console.php
    • /var/www/nextcloud/updater/../status.php

looking online some have said it's

sudo chown -R www-data:www-data /var/www/nextcloud


which i don't have i have usr/local/www/nextcloud ( who's owner and group are www www and www-data doesn't exist.
runnning TOP i see www running php which is nextcloud i believe
as this is a bespoke install i assume this won't apply to me

any ideas?
if there a different way to update nextcloud?
many thanks
Mark
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If you installed using my script, Nextcloud will be in /usr/local/www/nextcloud, and the correct user would be www. That would make the correct command chown -R www:www /usr/local/www/nextcloud. There's no need for sudo; you're running as root anyway.
 

markymark832

Dabbler
Joined
Feb 28, 2017
Messages
36
If you installed using my script, Nextcloud will be in /usr/local/www/nextcloud, and the correct user would be www. That would make the correct command chown -R www:www /usr/local/www/nextcloud. There's no need for sudo; you're running as root anyway.
Thanks for the reply, www is the owner of that area already, and the issue is still there.
I might create the www-data account and group and change ownership to see if it helps it? if not I will change it back
or is there a way of updating not through the webgui ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
might create the www-data account and group and change ownership to see if it helps it?
Why would you think that might possibly help? If there isn't a www-data user (and if you used my script--which I note you haven't yet answered--there isn't), the fact that the Nextcloud files aren't owned by that user can't possibly be the source of the problem.
or is there a way of updating not through the webgui ?
Yes, through the occ command. su -m www -c 'php /usr/local/www/nextcloud/occ upgrade' should do it.
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
Thanks for the reply, www is the owner of that area already, and the issue is still there.
I might create the www-data account and group and change ownership to see if it helps it? if not I will change it back
or is there a way of updating not through the webgui ?
Did you run the command @danb35 gave you? It recursively sets the permissions to all files and directories within /usr/local/www/nextcloud to www:www. Unless you're saying that you checked every one of those files and they are all owned by the www user and group. The other thing to check is the permissions - what is the output of ls -al /var/www/nextcloud/updater/../occ (insert the full/appropriate path) - make sure the www user has the write bit set.

Creating the www-data user and group and changing ownership to these will do nothing. These are the defaults in a linux environment. In BSD the default is www. The web server will be running as the www user, not www-data.
 
Last edited:

markymark832

Dabbler
Joined
Feb 28, 2017
Messages
36
Why would you think that might possibly help? If there isn't a www-data user (and if you used my script--which I note you haven't yet answered--there isn't), the fact that the Nextcloud files aren't owned by that user can't possibly be the source of the problem.
understand that, i was only going of what the general google answer for the error below says
Check for write permissions
The following places can not be written to:
  • /var/www/nextcloud/updater/../AUTHORS
  • /var/www/nextcloud/updater/../robots.txt
  • /var/www/nextcloud/updater/../index.php
  • /var/www/nextcloud/updater/../public.php
  • /var/www/nextcloud/updater/../remote.php
  • /var/www/nextcloud/updater/../occ
  • /var/www/nextcloud/updater/../.htaccess
  • /var/www/nextcloud/updater/../.user.ini
  • /var/www/nextcloud/updater/../COPYING
  • /var/www/nextcloud/updater/../version.php
  • /var/www/nextcloud/updater/../cron.php
  • /var/www/nextcloud/updater/../index.html
  • /var/www/nextcloud/updater/../console.php
  • /var/www/nextcloud/updater/../status.php


could it be that a link has gone as it's looking for /var/www and not usr/local/www ? like a mount point?


Yes, through the occ command. su -m www -c 'php /usr/local/www/nextcloud/occ upgrade' should do it.

tried this and in the console and for the below output

root@verulamcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ upgrade'
Nextcloud is already latest version

the webgui says

Initializing
Current version is 15.0.5.
Update to Nextcloud 16.0.11 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-16.0.11.zip
it says in the general setting that 15.0.0.5
The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible

output of
ls -al /usr/local/www/nextcloud/updater/../occ not ls -al /var/www/nextcloud/updater/../occ as it can't find that path
says
root@verulamcloud:~ # ls -al /var/www/nextcloud/updater/../occ
ls: /var/www/nextcloud/updater/../occ: No such file or directory

root@verulamcloud:~ # ls -al /usr/local/www/nextcloud/updater/../occ
-rw-r--r-- 1 www www 283 Jun 12 07:46 /usr/local/www/nextcloud/updater/../occ



(again is this a link issue as the var/www/nextcloud/updater/../occ isn't reachable?)

mount only shows root to the local disk on freenas
root@verulamcloud:~ # mount
Jails-VMs/iocage/jails/versamcloud/root on / (zfs, local. nfsv4acls)

sorry my knowledge on these things are limited so I do appreciate your help.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
if there's a way to check i can for you
Hmmm. As I'm digging into the state of my script two years ago, I'm thinking you didn't--it looks like I'd been placing the Nextcloud files in
/usr/local/www/apache24/data/nextcloud, which doesn't match what you're seeing. I didn't start putting them in /usr/local/www/nextcloud until I made the switch to Caddy with Nextcloud 16, as best I can tell, and since you aren't using Nextcloud 16, you wouldn't be using Caddy with my script.

From the FreeNAS shell, what's the output of iocage fstab -l <jailname>?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
understand that, i was only going of what the general google answer for the error below says



could it be that a link has gone as it's looking for /var/www and not usr/local/www ? like a mount point?




tried this and in the console and for the below output



the webgui says


it says in the general setting that 15.0.0.5
The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible

output of
ls -al /usr/local/www/nextcloud/updater/../occ not ls -al /var/www/nextcloud/updater/../occ as it can't find that path
says




(again is this a link issue as the var/www/nextcloud/updater/../occ isn't reachable?)

mount only shows root to the local disk on freenas


sorry my knowledge on these things are limited so I do appreciate your help.
Try running the follwoing command within your jail:
find /usr -name "occ"

This should give you the location of the "occ" command where to run from.
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
Beside what is written in https://docs.nextcloud.com/server/1...se_proxy_configuration.html#service-discovery do I need anything else to run Nextcloud/Caddy, installed with http->NO_CERT, behind Nginx SSL reverse proxy? Plus I'd tried to change 'overwrite.cli.url' to new url but it results in "Internal Server Error" when opening Nextcloud directly.
Inserted config changes:
Code:
  'overwrite.cli.url' => 'https://nextssl.xxxx.net/'
  'trusted_proxies'   => ['172.16.1.1'],
  'overwritehost'     => 'nextssl.xxxx.net',
  'overwritewebroot'  => '/',
  'overwriteprotocol' => 'https',
  'overwritecondaddr' => '^172.16.1.1$',

I'm having hard time to setup proxy on Opnsense. All I get is blank page with Nginx SSL certificate....
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I've really done very little with Nextcloud behind a reverse proxy, so I don't think I'll have much help to give you. But I'd think HAProxy on OPNsense would be much easier to set up than nginx.
 
Top