Occ upgrade issue

help

#1

Hey,

Im trying to upgrade my server from 9.01 to 9.1 and I cannot finish it because the occ command does not seem to work

This is my first upgrade and I am following the infos from the online manual https://doc.owncloud.org/server/9.1/admin_manual/maintenance/package_upgrade.html

thank you

Steps to reproduce
1. try to use sudo -u www-data php occ upgrade

Expected behaviour
upgrade

Actual behaviour
bash: -u: command not found

Server configuration
Operating system: debian 8.4
Web server: 9.1
Database: MySQL latest
PHP version: latest
ownCloud version (see ownCloud admin page): 9.1
Updated from an older ownCloud or fresh install: in the process of upgrading from 9.01 to 9.1

Here is a paste of my console output:
total 192
root@aas:/var/www/owncloud# ls -l
total 192
drwxr-xr-x 29 root root 4096 Oct 11 22:08 3rdparty
drwxr-xr-x 28 www-data www-data 4096 Oct 11 22:07 apps
drwxr-xr-x 2 www-data www-data 4096 Apr 7 2016 assets
-rw-r--r-- 1 root root 8301 Sep 19 18:04 AUTHORS
drwxrwxr-x 2 www-data www-data 4096 Oct 11 22:08 config
-rw-r--r-- 1 root root 3805 Sep 19 18:04 console.php
-rw-r--r-- 1 root root 34520 Sep 19 18:04 COPYING-AGPL
drwxr-xr-x 17 root root 4096 Oct 11 22:08 core
-rw-r--r-- 1 root root 5080 Sep 19 18:04 cron.php
drwxrwx--- 7 www-data www-data 4096 Oct 4 04:20 data
-rw-r--r-- 1 root root 35830 Sep 19 18:04 db_structure.xml
drwxr-xr-x 2 root root 4096 Apr 7 2016 etc
-rw-r--r-- 1 root root 179 Sep 19 18:04 index.html
-rw-r--r-- 1 root root 2282 Sep 19 18:04 index.php
drwxr-xr-x 3 root root 4096 Oct 11 22:08 l10n
drwxr-xr-x 6 root root 4096 Oct 11 22:08 lib
-rwxr-xr-x 1 root root 283 Sep 19 18:04 occ
drwxr-xr-x 2 root root 4096 Oct 11 22:08 ocs
drwxr-xr-x 2 root root 4096 Oct 11 22:08 ocs-provider
-rw-r--r-- 1 root root 3086 Sep 19 18:04 public.php
-rw-r--r-- 1 root root 5428 Sep 19 18:04 remote.php
drwxr-xr-x 4 root root 4096 Apr 15 12:56 resources
-rw-r--r-- 1 root root 26 Sep 19 18:04 robots.txt
drwxr-xr-x 12 root root 4096 Oct 11 22:08 settings
-rw-r--r-- 1 root root 1893 Sep 19 18:04 status.php
drwxr-xr-x 4 www-data www-data 4096 Oct 11 22:08 themes
drwxr-xr-x 7 root root 4096 Oct 11 22:08 updater
-rw-r--r-- 1 root root 233 Sep 19 18:05 version.php
root@snz:/var/www/owncloud# -u www-data php occ upgrade
bash: -u: command not found
root@aas:/var/www/owncloud#


#2

You're missing the "sudo" command in front of the "-u" parameter.


#3

I have tried with sudo. It does not work either. I should not need sudo if I am root already right ?


#4

No, root is not correct:

https://doc.owncloud.org/server/9.1/admin_manual/configuration_server/occ_command.html#run-occ-as-your-http-user


#5

ok so you mean I have to run it from my user account ? I saw that in the doc but was unsure.


#6

Ok I have installed sudo and configured it for my user and I am getting the following error:

Could not open input file: occ

not sure what to do now :frowning: Permission ?


#8

sorry my bad; I forgot to change directory to var/www/owncloud

seems to be working now


#9

cool I just did my firs OC update; only took me 6 hours haha :smiley: