Open-AudIT
https://www.open-audit.org/phpBB3/

wget doesn't need to write its output
https://www.open-audit.org/phpBB3/viewtopic.php?f=9&t=3015
Page 1 of 1

Author:  kkeane [ Mon Oct 20, 2008 6:16 am ]
Post subject:  wget doesn't need to write its output

In a number of places in the linux scripts, there is a sequence like the following. This requires write access to the current directory.

wget ... http://...../somefile.php
rm somefile.php

That could be better replaced with this sequence:

(at the top of the file)
OA_WGET_OUTPUT=/dev/null

(down below)
wget -O $OA_WGET_OUTPUT ... http://...../somefile.php

Two advantages:

- Since the output is never written to a file, there is no problem with a read-only directory.
- for debugging, you can easily redirect the output either to stdout or to a real file, just by changing OA_WGET_OUTPUT. Note: to send output to stdout, use a minus sign as the file name:
OA_WGET_OUTPUT=-

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/