mhonarc-users

Re: umask and mode of files created by mhonarc rw-------

1999-05-10 13:08:02
with UMASK 0 -> rw- instead of rwx
      1 -> rw- ok            
      2 -> r-- instead of r-x
      3 -> r-- ok
      4 -> -w- instead of -wx
      5 -> -w- ok
      6 -> --- instead of --x
      7 -> --- ok

am i wrong about what UMASK does ?

Yes.  In most Unices UMASK(2) will not set execute permissions
on files.  However, they will do what you're expecting above 
on directories.

how can i have my files set to -rwxr-xr-x (755) ?

When I was using the XBitHack feature of Apache with SSI I
ended up post-processing the directory that the archives were
written to; something like:

   (cd $rcDir ; $mhonarc -umask 022 -rcfile rc -outdir $archiveDir; \
    find $archiveDir -type f -exec chmod a+x {} \;)

(although you may want to limit that to only .html files or something;
not sure if you want to interpret your attachments as SSI -- could make
for some funky Word documents or .GIF images)

Chris

<Prev in Thread] Current Thread [Next in Thread>