DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th November 2015
srivo srivo is offline
Port Guard
 
Join Date: Nov 2015
Location: Canada
Posts: 12
Default /dev/urandom is not readable by PHP

Hi All,

I installed owncloud 8.1.0p2 on OpenBSD 5.8. Everything seem to work fine except I have the following message in owncloud admin:

/dev/urandom is not readable by PHP...


The following is use by my server:
  • httpd (OpenBSD webserver)
  • php 5.6
  • php-fpm
  • postgresql-server

I succeeded in debugging most of the error message but not this one!

Regards,

S
Reply With Quote
  #2   (View Single Post)  
Old 17th November 2015
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

This is because httpd runs in a chroot which does not have /dev in it.

For now, I've been ignoring this. Not sure if OC really needs /dev/urandom, if it should be added to the chroot, or if it doesn't matter.

Tim.
Reply With Quote
  #3   (View Single Post)  
Old 17th November 2015
srivo srivo is offline
Port Guard
 
Join Date: Nov 2015
Location: Canada
Posts: 12
Default

I succeed getting rid of it by copying /dev/urandom to the root of httpd but not sure it's a good practice! urandom doesn't like to be copied and you need to stop it before it fill the disk!

Did you succeed getting rid of the memory cache message also?

S

Last edited by srivo; 17th November 2015 at 02:43 PM. Reason: typo
Reply With Quote
  #4   (View Single Post)  
Old 17th November 2015
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

You can't copy urandom, it's not a file.

Use mknod to create it, if that's what you want to do.

I don't think I fixed the memcache error either, I'll have to look again. I use OC only for myself so I don't care about the performance and such.

Tim.
Reply With Quote
  #5   (View Single Post)  
Old 17th November 2015
srivo srivo is offline
Port Guard
 
Join Date: Nov 2015
Location: Canada
Posts: 12
Default

Thanks! for this help!
Reply With Quote
  #6   (View Single Post)  
Old 17th November 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,972
Default

There was a discussion thread on the misc@ mailing list two years ago regarding /dev/urandom in chrooted applications.

http://marc.info/?t=138306424000001&r=1&w=2

The recommendation was, of course, to correct the application so that it was not dependent upon random device nodes. Easy for compiled source code that uses standard libraries. Less easy for interpreted applications.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:37 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick