Installation issues

Steps to reproduce

1.Install a fresh Ubuntu 20.04 (in a virtual machine running on a Mac via VMware Fusion)
2. Go through the steps as described here: Install ownCloud on Ubuntu 20.04 :: ownCloud Documentation.
3. ‘Preparation’ steps work when eventually work out that I need to prefix each line with sudo
4. When I run the next step to create the occ Helper Script, I get an error message “bash: /usr/local/bin/occ: Permission denied”

Expected behaviour

occ helper scripts installs

Actual behaviour

From the instructions, I’ve tried copy+paste the whole console section and I’ve tried pasting it line-by-line. I’ve also tried adding sudo to each line:

/bin/cat <$FILE
#! /bin/bash
cd /var/www/owncloud
sudo -E -u www-data /usr/bin/php /var/www/owncloud/occ “$@”

Server configuration

Operating system: Ubuntu 20.04.3

Any installation task has (usually) to be done as root.
Thus, sudo su is your friend. :wink:

I must be doing something wrong as I’ve tried sudo and it still doesn’t work

Then you should login as root.

I’ve tried that as well, I can’t get past this stage

Hi elmeto,

Did you set proper permissions? In the docs it reads:

chmod +x /usr/local/bin/occ

You can ignore the helper script part, if you do not know how to get it running. Instead use
sudo -u www-data php /path/to/your/owncloud/installation/occ
followed by the occ command you want to execute.

So everytime the documentation says occ replace it with the above line.

If I run chmod +x /usr/local/bin/occ, I get this: chmod: cannot access ‘/usr/local/bin/occ’: No such file or directory

The snippet tries to create a file /usr/local/bin/occ, this needs root access.

which the OP obviously cannot achieve. That’s why I wrote the alternative.

In any case, you absolutely do not need that helper script. I’d recommend to use the
sudo -u www-data php /path/to/your/owncloud/installation/occ

when I do that, I get this:

sudo -u www-data php /path/to/your/owncloud/installation/occ
[sudo] password for resserver:
sudo: php: command not found

You did read the section “Install the Required Packages” at Install ownCloud on Ubuntu 20.04 :: ownCloud Documentation, did you?

Well, that’s the next step after I get past this step so I figured I should be following in this order?

In my documentation the actual installation is one of the last steps.

Try to understand what is happening by reading the complete docs first, before wildly typing any commands.

I don’t think I’m wildly typing commands. I’m following step-by-step the instructions on this page, which is the Quick Installation Guide for Ubuntu 20.04: Install ownCloud on Ubuntu 20.04 :: ownCloud Documentation

Obviously not. There is not a single usage of occ before the sections where you should install the packages and configure the database.

Anyway, I’m off this topic. Have a nice day.

You should modify it to

sudo -u www-data /path/to/your/php /path/to/your/owncloud/installation/occ

But of course, it is not useful to run occ before setting up ownCloud.

I’m a bit confused and wondering if we’re talking about the same set of instructions. I’m attaching a screenshot of the ones I’m looking at, in which it has these steps:

  1. Prerequisites - DONE
  2. Preparation - DONE
  3. Create the occ Helper Script
  4. Install the Required Packages

Am I missing something?

As I wrote before, ignore the helper script. You did not succeed to create this file and I’ll not provide basic Linux knowlege. There are lots of tutorials on the web.

Use my variant calling occ, but only when it comes to occ. not before. So your next step is “Install the Required Packages”

Ok, thanks for that. I skipped that step and moved on.