Trouble installing owncloud on Ubuntu 22.04

Can someone please help me with this. I’m very much a novice on ubuntu or on setting up web server, so please bear with me. I am having a trouble finalize the installation of owncloud onto my Ubuntu desktop.

I’m trying to install owncloud on my Ubuntu 22.04 desktop carefully following the instructions on owncloud documentation, and I believe I got all the prerequisites and configurations listed properly, though I could be wrong. I’ve gone through the prerequisites several times so if there’s something wrong, I wouldn’t be able to detect it on my own.
I downloaded the ownCloud binary, and followed script-guided installation which seemed to have worked. But when I tried to finalize the installation with graphical installation wizard, I was told:
MySQL/MariaDB enter the database username and name.
Can’t create or write into the data directory /var/www/owncloud/data
Can’t create or write into the apps-external directory /var/www/owncloud/apps-external

Tried command line installation instead, and got similar error message.

After much looking and poking around with configuration, prerequisites, and chown command, I decided to delete the owncloud folder and re-install. Now I cannot open the graphical installation wizard on my browser.

Expected behaviour

Tell us what should happen
Proper installation and running of ownCloud on my Ubuntu 22.04 desktop

Actual behaviour

Tell us what happens instead
at the final step in installation, I get error telling me:
Can’t create or write into the data directory /var/www/owncloud/data
Can’t create or write into the apps-external directory /var/www/owncloud/apps-external

Steps to reproduce

  1. Followed instructions on owncloud documentations, tried both the quick guide and detailed guide (maybe that’s the problem?).
  2. I believe I install all the prerequisite without trouble.
  3. Following the detailed instructions, downloaded the latest version of the owncloud. Untar-ed into /var/www/owncloud/
  4. Tried to finalize the installation using the graphical installation wizard, entering the name and password.
  5. got error saying “MySQL/MariaDB enter the database username and name. Can’t create or write into the data directory /var/www/owncloud/data Can’t create or write into the apps-external directory /var/www/owncloud/apps-external”
  6. after several tries, I removed the owncloud directory and un-tar the owncloud again, now following the quick installation guide.
  7. Now the problem seemed to have gotten worse because I cannot open the graphical installation wizard on my browser anymore.

Server configuration

Operating system:
Ubuntu 22.04

Web server:
Apache2

Database:
mySQL/MariaDB

PHP version:
7.4
8.3

ownCloud version:
latest?

Storage backend (external storage):

Hi.

It seems that apache user have not rigts to write in /var/www/owncloud/

Try this command:
chown -R www-data:www-data /var/www/owncloud/

It solve many problems.

2 Likes

thank you for the advice.
I actually managed to fix the issue on my own, and the actual problem happened to be somewhere else.

The issue apparently was that mysql was installed as part of anaconda3 package, and PATH variable was directing to anaconda3 directories. I’ve removed mysql from anaconda, fixed PATH, and reinstalled mysql. I also went through several configuration files of mysql, apache, and owncloud and checked the paths.

2 Likes