[SOLVED] dev/urandom is not readable by PHP on Synology

Ask all your questions regarding OC 9.0 Please read the Support Forum Rules
Forum rules
The forums were migrated over to https://central.owncloud.org which is based on the forum software Discourse. The forums here is put into read-only mode starting from today.

More background information about this move and the reasoning behind it is available in this blogpost:

https://daniel.molkentin.net/2016/07/20 ... d-central/
own315
Beginner
Posts: 12
Joined: Thu Mar 10, 2016 9:25 pm
ownCloud version: 9.0.0
Webserver: Apache
Database: MySQL
OS: Linux Embedded
PHP version: 5.5.31

[SOLVED] dev/urandom is not readable by PHP on Synology

Postby own315 » Sat Mar 12, 2016 4:25 pm

Environment: Synology NAS 412+/Linux 3.10.35
Server: Apache/2.2.31 (Unix)
Database: MySQL/MariaDB 5.5.44-0034
Client: Firefox on Windows 7/CardDAV on iOS 9.2.1
OC-Version: 9.0.0.19
PHP-Version: 5.5.31

Hello, after upgrade to 9.0.0, I get the warning in the admin pane:

Code: Select all

dev/urandom is not readable by PHP which is highly discouraged for security reasons.


I tried to add this line to the config.php, but the message is still there:

Code: Select all

'memcache.local' => '\OC\Memcache\APCu'


Error Logs:

Code: Select all

is_readable(): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/var/services/tmp:/etc.defaults:/usr/bin/php:/usr/syno/synoman:/etc:/var/run:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes) at /volume1/web/owncloud/3rdparty/paragonie/random_compat/lib/random.php#66


Thanks a lot!
Last edited by own315 on Sun Mar 13, 2016 2:03 am, edited 1 time in total.
Environment: Synology NAS 412+/Linux 3.10.35
Server: Apache/2.2.31 (Unix)
Database: MySQL/MariaDB 5.5.44-0034
Client: Firefox on Windows 7/CardDAV on iOS 9.2.1
OC-Version: 9.0.0.19
PHP-Version: 5.5.31

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: dev/urandom is not readable by PHP

Postby RealRancor » Sat Mar 12, 2016 4:30 pm

Please put the message:

is_readable(): open_basedir restriction in effect.

into your favorite search engine how to correctly configure this PHP setting. Even the already linked:

https://doc.owncloud.org/server/9.0/adm ... ndom-label

in your previous topic is giving you the info what to do:

When having an open_basedir configured within your php.ini file, make sure to include /dev/urandom.
*gone*

hoorna
Newbie
Posts: 8
Joined: Fri Dec 13, 2013 5:36 pm
ownCloud version: 8.1.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.26

Re: dev/urandom is not readable by PHP

Postby hoorna » Sat Mar 12, 2016 5:02 pm

@own315: You can edit the open_basedir definition in the DSM 5.2 webinterface at Configuration Settings -> Webservices -> PHP-settings. Add at the end of the line ":/dev/urandom".

own315
Beginner
Posts: 12
Joined: Thu Mar 10, 2016 9:25 pm
ownCloud version: 9.0.0
Webserver: Apache
Database: MySQL
OS: Linux Embedded
PHP version: 5.5.31

Re: dev/urandom is not readable by PHP

Postby own315 » Sun Mar 13, 2016 2:02 am

hoorna wrote:Add at the end of the line ":/dev/urandom".

Hey hoorna, that was it! Great, thanks!
Environment: Synology NAS 412+/Linux 3.10.35
Server: Apache/2.2.31 (Unix)
Database: MySQL/MariaDB 5.5.44-0034
Client: Firefox on Windows 7/CardDAV on iOS 9.2.1
OC-Version: 9.0.0.19
PHP-Version: 5.5.31


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Server 9.0”

Who is online

Users browsing this forum: No registered users and 0 guests