Update owncloud fail on UBUNTU 16.04

when I try to run occ with www-data user (ie sudo -u www-data php occ upgrade) I get the following message :
"PHP Warning: require_once(): open_basedir restriction in effect. File(/var/www/owncloud/console.php) is not within the allowed path(s): (/dev/urandom) in /var/www/owncloud/occ on line 12
PHP Warning: require_once(/var/www/owncloud/console.php): failed to open stream: Operation not permitted in /var/www/owncloud/occ on line 12
PHP Fatal error: require_once(): Failed opening required '/var/www/owncloud/console.php' (include_path='.:/usr/share/php') in /var/www/owncloud/occ on line 12"
I try to find by myself but now I have no idea. And you?
best regards

Expected behaviour

With a operational owncloud I update with official depots and synaptic automatic update. when I use the the https site and the update fail.

Actual behaviour

I try using occ as I say before

Server configuration

Operating system:
ubuntu 16.04 uptodate
Web server:
PHP version:
ownCloud version: (see ownCloud admin page)
Updated from an older ownCloud or fresh install:
Where did you install ownCloud from:

I did the following search https://www.google.com/search?q=open_basedir+restriction+in+effect and found https://stackoverflow.com/questions/223800/how-can-i-relax-phps-open-basedir-restriction or https://www.templatemonster.com/help/open_basedir-restriction-in-effect-filex-is-not-within-the-allowed-paths-y.html which seems to me that those are quite thoroughly explain what to do when facing such a misconfigured PHP environment.

thanks for your advices, but for now I dont find the bug. my configuration before the update worked fine.
I try again to understand the wrong configuration.

I found a solution but I am not sure It's a good one

In my php.ini (cli directory) I comment the line open_basedir = /dev/random. I can update without mistake but in Hardening and Security Guidance It's advice to keep this.

I am going to found a better solution.

Best regard

I think you should review my posted links which are telling you how to configure the open_basedir correctly.