473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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?

Oct 7 '05 #1
2 4756
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...

Oct 7 '05 #2
ZeldorBlat wrote:
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...


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.

Oct 7 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Martin | last post by:
I have a PHP script that should be run a few times a day. Currently I run this script manually as I haven't been able to set up Lynx or wget to run it as a cronjob. Or to be more specific: the...
1
by: LRW | last post by:
In a PHP script I have the following two lines: $thumbproc = escapeshellcmd("wget -q -T 2000 http://(A URL)/pa-thumbs/createthumbs.php?dir=".$order_po." &"); exec("$thumbproc 2>&1", $output); ...
2
by: BLElliott | last post by:
I think this is a very basic question, so feel free to direct me to a FAQ or other resource to go and get myself educated, if that's the best answer. Can I perform web browser functions from a...
9
by: olivier HARO | last post by:
Hello everybody, I have a little problem with a littre program i'm writting : I use the system(char* s) function in my program to retreve an information. The problem is that when wget in...
7
by: petr pilsl | last post by:
sorry - no idea where to post my question, so I crossposted to a linux and a html-authoring-group. Both groups might be familiar with wget. wget -p http://www.goldfisch.at does not load the...
3
by: Jesse | last post by:
Hi all, I have a problem using wget and Popen. I hope someone can help. -- Problem -- I want to use the command: wget -nv -O "dir/cpan.txt" "http://search.cpan.org" and capture all it's...
7
by: chandru1782 | last post by:
Dear friends, I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy. when trying to install...
2
by: Don69 | last post by:
I have a problem with PHP where wget generates 0 byte files. Below is the code that I use. // ******************** $savedir = "/webroot/vifs/app/webroot/static/1234567890"; $url =...
2
by: laredotornado | last post by:
Hi, I'm using PHP 5. I'm wondering if there is a way to optimize the below. Specifically, I'm making a call in the background to wget, but I'm retrieving a page from my own server ... ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.