Give PHP read access to /dev/urandom

Nextcloud version: 13.0.0
Operating system and version : Raspian 8 "jessie"
Apache or nginx version: apace 2.4.10
PHP version: 7.0.26

Hey there,

I’m trying to follow the steps in https://docs.nextcloud.com/server/13/admin_manual/configuration_server/harden_server.html
and I’m stuck at giving php read access to the /dev/urandom device.

The instruction puts it in one sentence to “simply” give php read access - but how? What do I have to write into the pho.ini-file (considering the change needs to be done to that file!) ?

I hope someone can help me.

1 Like

Find your php.ini file.

updatedb && locate php.ini

Edit the php.ini file, the one with apache with it.
Search for open_basedir = and edit it to become

open_basedir = /dev/urandom

Restart apache

1 Like

When I do the above it stops access to the webpage? Do you know why that might be?