This won't solve the problem of the files being created with the wrong
permissions, but a quick fix may be to call ns_chmod after the file has
been written.

See
http://aolserver.sourceforge.net/docs/devel/tcl/api/file.html#ns_chmod



Ross



On Tue, 2004-02-24 at 12:48, Janine Sisk wrote:
> We have a client who wants to have files written by AOLserver to have
> perms 664 instead of 644.  We've tried various permutations of setting
> umasks, but nothing seems to help.  We're using nsd 3.3 (the Arsdigita
> version).
>
> Files are written to by the application in three different ways:
>
> # create a blank file (file-manager)
> close [open $path w]
>
> # get an uploaded file  (bboard)
>   set tmp_filename [ns_queryget upload_file.tmpfile]
>   set n_bytes [file size $tmp_filename]
>   if { $n_bytes > 0 } {
>       ns_cp $tmp_filename $new_full_local_path
>   }
>
> # exec a shell command (imagedb)
>   if {[catch [exec convert $orig_path -geometry 500 $new_md_path]
> errmsg]} {
> ...
>
> I would expect the exec to work correctly, since it's shelling out and
> should obey the user's umask setting, but have not actually tried it
> (sometimes being the middleman in these situations makes it more
> difficult to debug;  it's not my code so I'm relying on someone else to
> tell me what's happening).
>
> Is there anything we can do, short of hacking nsd, to affect the
> permissions used when files are written to?
>
> thanks,
>
> janine
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with 
> the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field 
> of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to