HTTP Error 500 after upgrading from Ubuntu 14.04 to 16.04

Hello guys,

sorry if i do anything wrong, first time posting here.
So basically I had Owncloud 9 running on my server for some time, then I decided to upgrade my distribution.
Now when opening the website for OwnCloud I get HTTP 500 error, all other websites on my server still work perfectly.

Already tried reinstalling it but didn't help, also Google didn't help me to fix it. Follwing lines pop up in the error log of apache:

[Wed Feb 22 15:22:55.812871 2017] [:error] [pid 1643] [client] PHP Fatal error: Uncaught Exception: Cannot open source device in /var/www/owncloud/lib/private/Security/SecureRandom.php:80\nStack trace:\n#0 /var/www/owncloud/lib/private/Security/SecureRandom.php(80): random_int(0, 63)\n#1 /var/www/owncloud/lib/private/AppFramework/Http/Request.php(484): OC\Security\SecureRandom->generate(20)\n#2 /var/www/owncloud/lib/private/Log/Owncloud.php(90): OC\AppFramework\Http\Request->getId()\n#3 [internal function]: OC\Log\Owncloud::write('PHP', 'Uncaught Except...', 3)\n#4 /var/www/owncloud/lib/private/Log.php(298): call_user_func(Array, 'PHP', 'Uncaught Except...', 3)\n#5 /var/www/owncloud/lib/private/Log.php(156): OC\Log->log(3, 'Uncaught Except...', Array)\n#6 /var/www/owncloud/lib/private/Log/ErrorHandler.php(67): OC\Log->critical('Uncaught Except...', Array)\n#7 [internal function]: OC\Log\ErrorHandler::onShutdown()\n#8 {main}\n thrown in /var/www/owncloud/lib/private/Security/SecureRandom.php on line 80

Has anybody ever seen this?


looks like [1] where PHP wasn't able to access the /dev device causing this issue.


Tried this solution but still get the same error and message in the log file.

Which oC versions are you running? Can you access /dev/ on command line with the user running your webserver?

But if you're still getting the "Cannot open source device" you probably still have that access permissions to /dev

9.1, switched user to www-data and could access /dev perfectly.
Just gonna set up a new server now since I downloaded all important stuff from it yesterday evening.


this is only the major version. Please always provide the full version like e.g. 9.1.4. This (and further infos) are also asked in the issue template shown when creating a new thread.