Also, if one would like to use occ utility from CLI, considering that the
whole owncloud runs chrooted under /var/www/ and that occ therefore looks
for /owncloud/apps folder (which is obviously /var/www/owncloud/apps) and
that www user is a nologin one, trying to run the following command:
# doas -u www /var/www/owncloud/occ

provides the following result:

PHP Notice:  Undefined index: SERVER_PROTOCOL in
/var/www/owncloud/lib/private/response.php on line 77
App directory "/owncloud/apps" not found! Please put the ownCloud apps
folder in the ownCloud folder or the folder above. You can also configure
the location in the config.php file.

How can occ then be run?
I solved this by temporarily symlinking the directory it asked for
to the root, which let me run occ, and then I removed the symlink.
I'm sure there is a better solution, but I needed something which
worked quickly. so something like this:

ln -s /var/www/owncloud/apps /owncloud/apps
doas -u www /usr/local/bin/php-5.6 /var/www/owncloud/occ

.jh

Reply via email to