title: Perl script can't unzip to mounted Windows share - permission denied
body: <p>I have a simple script that is unzipping a file to a mounted Windows share.  It is normally launched as a Postfix alias when a new email arrives, but even when I run it as root I get a permission denied error.  </p>
  
  <p>The script is doing this:</p>
  
  <pre><code>if ( &lt;/tmp/*.zip&gt; ){
          unzip '&lt;/tmp/*.zip&gt;' =&gt; '&lt;/mnt/win/#1.txt&gt;'
                  or die "unzip failed: $UnzipError\n";
  }
  </code></pre>
  
  <p>As root I can copy files to /mnt/win without a problem, but when this script is launched by Postfix it fails with permission denied.  </p>
  
  <p>/etc/fstab looks like:</p>
  
  <pre><code>//srvr1/tmp /mnt/win  cifs credentials=/root/.smbcredentials,iocharset=iso8859-1,sec=ntlm 0 0
  </code></pre>
  
  <p>ls -ld looks like:</p>
  
  <pre><code>drwxr-xr-x 2 root root 196608 Jul 15 17:24 /mnt/win
  </code></pre>
  
  <p>Files produced by the script are nobody/nogroup, but I'm not sure how I change the permissions of /mnt/win to allow nobody/nogroup to read/write.  </p>
  
  <pre><code>cmhod -R ugo+RW /mnt/win 
  </code></pre>
  
  <p>Also gives permission denied. Is there a way to change permissions in /etc/fstab to allow nobody/nogroup?</p>