Doug --

...and then Doug Wright said...
% 
% I log into a remote machine to check my mail. If I get an attachment that
% will only open on a windows machine I need to get that file to my desktop.
% Now I am saving the attachment and typing the full path to a folder that is
% accessible from a web server ie /home/doug/public_html/attachments/ I then

I don't have exactly the same conditions, but certainly similar enough.


% have to go to that folder before I can get it and chmod the permissions so
% apache will let go of it. is there a way to set a default save attachment
% folder and have the permissions set to 644 in one fail swoop? thanks

Nope.  You've seen the discussion of why that's so and why that's a Good
Thing (tm), so I won't go on.

I will, however, once again attach the little mpack/munpack wrapper that
I wrote, which I call wmunpack, which takes an optional flag to determine
the drop point for attachments and then dumps 'em there.  Enjoy (and
check the archives next time ;-)


% 
% Doug


HTH & HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

#!/bin/sh
# quickie to munpack from email to web dir

WWW=$HOME/www/wmunpack                          # where's the landing zone?
DIR=tmp                                         # default dir

case "$1" in                                    # called as 'wmunpack -d'?
  -p ) DIR=pix ;;
  -d ) DIR=doc ;;
  *  ) DIR=tmp ;;
esac

umask 022                                       # make it readable
[ -d $WWW/$DIR ] || mkdir -p $WWW/$DIR          # pave the way
cd $WWW/$DIR                                    # go there
munpack                                         # pipeline the input (message)

Attachment: msg29785/pgp00000.pgp
Description: PGP signature

Reply via email to