I would argue that if you can’t answer these questions yourself you shouldn’t run the script, because you won’t be able to figure out if this script even applies to your type of installation. These are basic Linux administration tasks, we can’t teach you here how to run a Linux server.
But because this is part of the docs, I’ll go into a little bit more detail to explain how to figure this out.
Let’s go through it variable by variable, I’ll tell you what the value would be for a Ubuntu installation created with this guide and how you would be able to figure it yourself.
htuser='www-data'
htgroup='www-data'
In Ubuntu systems you can have a look in the file /etc/apache2/envvars
, there you’ll find the variables APACHE_RUN_USER
and APACHE_RUN_GROUP
. On CentOS you’ll find the User
and Group
directives in /etc/httpd/conf/httpd.conf
. Another option is to use ss
to find the name of the process on the http/s
ports and then look up the username using the ps
command like so:
root@ubuntu1804:~# ss -pa '( sport = https or sport = http )'
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 128 *:http *:* # added line break for readability
users:(("apache2",pid=3338,fd=3),("apache2",pid=3301,fd=3),("apache2",pid=3300,fd=3),("apache2",pid=3299,fd=3),("apache2",pid=3298,fd=3),("apache2",pid=3297,fd=3),("apache2",pid=629,fd=3))
tcp LISTEN 0 128 *:https *:* # added line break for readability
users:(("apache2",pid=3338,fd=4),("apache2",pid=3301,fd=4),("apache2",pid=3300,fd=4),("apache2",pid=3299,fd=4),("apache2",pid=3298,fd=4),("apache2",pid=3297,fd=4),("apache2",pid=629,fd=4))
# if you don't get any output here, then it could be that your installation is running on a different port
root@ubuntu1804:~# ps u $(pgrep apache2)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 629 0.0 6.0 811764 29900 ? Ss Jul01 0:05 /usr/sbin/apache2 -k start
www-data 3297 0.0 8.7 823872 43184 ? S 06:25 0:01 /usr/sbin/apache2 -k start
[...]
Let’s have a look at the other two variables, as the logfile will just be generated in your current working directory there isn’t anything else to say about it.
ocpath='/var/www/owncloud'
ocstorage='/var/www/owncloud/data'
To figure out where your owncloud installation is, have a look in the apache configuration directory (Ubuntu: /etc/apache2
, CentOS: /etc/httpd
) and find the virtual host configuration for your owncloud installation. If you followed the guide mentioned earlier this is in /etc/apache2/sites-enabled/owncloud.conf
.
In there find the Directory
configuration directive and it will show the path to the ownCloud folder /var/www/owncloud/
. Then have a look at /var/www/owncloud/config/config.php
where you’ll find the following configuration directives:
'datadirectory' => '/var/www/owncloud/data',
Finally regarding rootuser='root'
, I don’t think I have ever seen a setup where the root user wasn’t called root
, so if you need to adjust this variable you will probably know.
Side note
I’ve tried to use commands that should work on as many Linux distributions out of the box as possible, if a command doesn’t work, try to find another way => the internet search engine of your choice is your friend