PHP 4.2 Needs To Call Wget

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Google Mike

    #1

    PHP 4.2 Needs To Call Wget

    I have an RH9 Linux PHP 4.2.2 web page that I need to call a Bash file
    under the context of root and do the wget command to download a file,
    clobbering the previous download of this same filename. It's bombing
    without leaving any trace. I tried introducing all manner of chmod,
    chown, sudo, and sticky bit, but this fails. The only thing I see in
    the syslog is failed sudo authenticaiton for user Apache. What's the
    technique to get this working?

  • ZeldorBlat

    #2
    Re: PHP 4.2 Needs To Call Wget

    Perhaps the apache user isn't in the list of sudo'ers? Although it is
    kind of scary that you have a webpage on the internet trying to execute
    things as root on the local machine...

    Comment

    • Google Mike

      #3
      Re: PHP 4.2 Needs To Call Wget

      ZeldorBlat wrote:[color=blue]
      > Perhaps the apache user isn't in the list of sudo'ers? Although it is
      > kind of scary that you have a webpage on the internet trying to execute
      > things as root on the local machine...[/color]

      It's an intranet server behind 3 firewalls and a personal firewall on
      the system. The web page is for entry-level sysops to conduct a data
      task. I tried the /etc/sudoers approach, which works in most other
      cases, but doesn't seem to work in this case.

      Last night the only resolution I found was to flip the sticky bit on
      the /usr/bin/wget program with:

      chown root.root /usr/bin/wget (this was already done on install of
      wget)
      chmod u+s /usr/bin/wget

      That seemed to fix the problem for now, although sticky bit techniques
      are not recommended by higher ups at my company.

      Comment

      Working...