Owncloud Occurs HTTP ERROR 500(Fresh install)

  1. I have Web server apache2 running with ssl
    my root directory : / home/user1/www

  2. I checked my Web server and Databse work well by the progrm dbmyadmin.

  3. I unziped owncloud zip file in /home/user1/www

  4. I connected https:://{mydomain}/owncloud.

  5. It looked like working well but ‘Can’t create or write into the data directory’ message was returned.

  6. I searched about that and I excuted the command line
    sudo chown -R www-data:www-data /home/user1/www/owncloud

  7. I connected https:://{mydomain}/owncloud. However, my Web server is returing ‘HTTP ERROR 500’

  8. owncloud config file and log file is empty, apache2 log is like bellow.

Expected behaviour

Owncloud Configuration page

Actual behaviour

Error page HTTP ERROR 500

Server configuration

Operating system: Ubuntu 16.04.5

Web server: apache 2.4.18

Database: mysql 15.1

PHP version: 7.0.30

ownCloud version: 10.0.9

Updated from an older ownCloud or fresh install: Fresh install

The content of config/config.php: config.php is empty


Web server error log

[Mon Aug 06 15:09:16.725410 2018] [:error] [pid 15393] [client] PHP Warning:  fopen(/home/user1/www/owncloud/config/config.php): failed to open stream: Permission denied in /home/user1/www/owncloud/lib/private/Config.php on line 252
[Mon Aug 06 15:09:16.725452 2018] [:error] [pid 15393] [client] PHP Warning:  flock() expects parameter 1 to be resource, boolean given in /home/user1/www/owncloud/lib/private/Config.php on line 262
[Mon Aug 06 15:09:16.725492 2018] [:error] [pid 15393] [client] PHP Fatal error:  Uncaught Error: Call to a member function getLogger() on null in /home/user1/www/owncloud/index.php:74\nStack trace:\n#0 {main}\n  thrown in /home/user1/www/owncloud/index.php on line 74

ownCloud log (data/owncloud.log)

ownCloud log is empty

How can I slove this problem?
Doens’t the ‘www-data’ work with ssl?
Please help my problem and sorry for my poor English.


did you have a look at the documentation?


Yes I read it and followed stpes.

Do you think I had skipped a certain step?

I already did these steps.


Even it said ‘The loopback address,, is automatically whitelisted’, the config.php was empty in my case. However web server returns same reult after I added the trusted domains.

do you have all the required packages?


If I follow your steps, and open a normal http connection to my cloud, I get redirected to the installation wizard.

Can you check if you have all the required packages and try a http connection instead of a https one.

Did you manage to get it working?

I’m following this page.

And before this step, it looked like work well.

Before this step server returns Can’t create or write into the data directory message.
I understand this.

But after this run-the-installation-wizard step, server returns HTTP ERROR 500.
And apache2 error log is same as I asked. I can’t understand this situation.

  • I already got a ssl certification for my server, I don’t know how to connect with normal http. sorry…

Please do, what @dimitry suggested above.

Understanding is not enough! You have to adjust ownership and access rights of everything below the owncloud directory.

Your HTTP user must own the config/, data/, apps/ respectively the apps-external/ directories so that you can configure ownCloud, create, modify and delete your data files, and install apps via the ownCloud Web interface.

I also think that there is a permission issue if the logs in the initial post are still showing up. They are exactly pointing an “Permission denied” out.

I tried with normal HTTP, it returns same result.

Before the command 'chown -R www-data:www-data /home/user1/www/owncloud’
It shows configuration page but after that command it returns HTTP ERROR 500.
And apache error logs are same.

Oh… I found my fault.

I specified AssignUserID user1 user1 in my apache conf file.
I think that’s why permission denied.
I removed that line and it works well with ssl.

Thank you so much in your help.