Re: [PHP] PHP Uptime error

2001-06-27 Thread billt

On Tue, Jun 26, 2001 at 05:40:07PM +1000, Peter Phillips wrote:
> Thanks for your help, this is what I get when I try a uptime while logged in
> as nobody.
> 
> 
> host:/# su nobody
> host:/$ uptime
> Error: /proc must be mounted
>   To mount /proc at boot you need an /etc/fstab line like:
>   /proc   /proc   procdefaults
>   In the meantime, mount /proc /proc -t proc
> Error: /proc must be mounted
>   To mount /proc at boot you need an /etc/fstab line like:
>   /proc   /proc   procdefaults
>   In the meantime, mount /proc /proc -t proc
>   2:38am  up 0 min,  1 user,  load average: 0.00, 0.00, 0.00
> 
> 
> These are the permissions is /proc:
> -r--r--r--   1 root root0 Jun 26 02:39 loadavg
> -r--r--r--   1 root root0 Jun 26 02:33 uptime
> 
> What should they be to enable nobody to access uptime?

What are the permission for /proc itself? it needs to be 755

If you have strace, you can strace uptime and see exactly what kind of
error you are getting when uptime tries to open /proc/uptime and
/proc/loadavg.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] apache+php chroot

2001-07-01 Thread billt

On Sun, Jul 01, 2001 at 07:44:19PM -0500, Ryan wrote:
> I have chrooted apache+php but am having simple problems
> like not being able to exec uptime.
> uptime has been moved to /usr/serv/apache/usr/bin/uptime..
> Well anyways heres my lil php line im tring to get running
> 
> 
> I get no errors from php, just doesnt show anything..
> I realize it needs a shell to execute so /usr/serv/apache/bin/bash
> and /usr/serv/apache/usr/etc/shells is setup correctly.  Would
> there be something that im missing? Im frustruated right now..

> Its something to do with the chroot env.  What am i missing??

is there a proc filesystem somewhere in your chroot? i have never
tried chrooting apache+php, but I know that uptime, at least on
linux, reads from proc/uptime and proc/loadavg. If you haven't
already, try mounting proc in wherever your chrooted '/' is.

good luck... 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]