Re: diskusage
| From: | - Edwin - | Date: | Thu, 19 Feb 2004 06:28:00 +0000 |
| Subject: | Re: diskusage | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178217@lists.php.net to get a copy of this message | ||
On Wed, 18 Feb 2004 21:21:45 -0500
"Chakravarthy Cuddapah" <cuddapah@hotmail.com> wrote:
> From the terminal I can do this by:
> ssh root@my_remote_server du -hs /home/user | awk '{print $1}'
Hmm... that's a pretty scary setup. You can ssh as root? Without
a password? I wouldn't want that kind of setup even if I'm using
"authorized_keys" and stuff. Anyway...
> The same does not work in php. I used system and also
> shell_exec. Works only on localhost. But not remote system.
Most likely it's because when you're running your (php) script
you're NOT running as root. Try running the script as root (from
the command line) and see what happens.
--
- E -