<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This is how the is setup:<div class=""><br class=""></div><div class="">TempDir=$(mktemp)</div><div class=""><br class=""></div><div class="">That makes a tmp file ….</div><div class=""><br class=""></div><div class="">Then …</div><div class=""><div class=""><br class=""></div><div class=""># Check if the tmpdir exists, if so delete so we start with a clean slate</div><div class="">if [ -x "${TempDir}" ]; then</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>rm -rf ${TempDir} >/dev/null 2>&1</div><div class="">fi</div><div class=""><br class="webkit-block-placeholder"></div><div class=""><br class=""></div><div class="">… What the fuck?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""># Make the Temp dir</div><div class="">umask 0077</div><div class="">mkdir "${TempDir}" >/dev/null 2>&1</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> … uhhhh … now we are doing it twice</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">then …</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">if [ $? ]; then </div><div class="">  ExtraScanOptions="$ExtraScanOptions --tempdir=${TempDir}"</div><div class="">  # If we are root chown it to the clamav user/group</div><div class="">  if [ `whoami` = "root" ]; then</div><div class="">    chown ${ClamUser}:${ClamGroup} "${TempDir}"</div><div class="">  fi</div><div class=""> fi</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">… why? the process that creates the /tmp/blah already owns /tmp/blah</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">In short … the logic is wrong.</div><div class=""><br class=""></div><div class="">Going to fix it. I suspect more items will need fixing. </div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">-</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Jerry Benton</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://www.mailborder.com" class="">www.mailborder.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jan 29, 2016, at 4:18 PM, Shawn Iverson <<a href="mailto:iversons@rushville.k12.in.us" class="">iversons@rushville.k12.in.us</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">So the script only needs the path in the variable, right?  If so, that should be fine.</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Jan 29, 2016 at 4:11 PM, Jerry Benton <span dir="ltr" class=""><<a href="mailto:jerry.benton@mailborder.com" target="_blank" class="">jerry.benton@mailborder.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So i noticed errors creating /tmp/blah<br class="">
<br class="">
wrapper code:<br class="">
<br class="">
TempDir=$(mktemp)<br class="">
<br class="">
should be:<br class="">
<br class="">
TempDir=$(mktemp -u)<br class="">
<br class="">
based on how the wrapper is structured. Errors then go away.<br class="">
<br class="">
<br class="">
Comments?<br class="">
<br class="">
-<br class="">
Jerry Benton<br class="">
<a href="http://www.mailborder.com/" rel="noreferrer" target="_blank" class="">www.mailborder.com</a><br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
--<br class="">
MailScanner mailing list<br class="">
<a href="mailto:mailscanner@lists.mailscanner.info" class="">mailscanner@lists.mailscanner.info</a><br class="">
<a href="http://lists.mailscanner.info/listinfo/mailscanner" rel="noreferrer" target="_blank" class="">http://lists.mailscanner.info/listinfo/mailscanner</a><br class="">
<br class="">
</font></span></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Shawn Iverson<div class="">Director of Technology</div><div class="">Rush County Schools</div><div class="">765-932-3901 x271</div><div class=""><a href="mailto:iversons@rushville.k12.in.us" target="_blank" class="">iversons@rushville.k12.in.us</a></div><div class=""><br class=""></div><div class=""><img src="https://docs.google.com/uc?export=download&id=0Bw5iD0ToYvs_UFV2VFdmNG1SaVE&revid=0Bw5iD0ToYvs_U3VaVlpuTFBtak9QZXVRL3FmRUd2d0laTkZRPQ" width="96" height="39" class=""><br class=""></div></div></div></div></div></div></div>
</div>
<br class=""><br class="">-- <br class="">MailScanner mailing list<br class=""><a href="mailto:mailscanner@lists.mailscanner.info" class="">mailscanner@lists.mailscanner.info</a><br class="">http://lists.mailscanner.info/listinfo/mailscanner<br class=""><br class=""></div></blockquote></div><br class=""></div></body></html>