Forum OpenACS Q&A: ArsDigita Reporte - problems with ns_perm and disk files

Has anyone setup aD Reporte? I think I've almost got it, but I'm getting stuck with some AOL 2.x vs. 3.x issues (and an ignorance of Tcl).

Reporte wants to use 2.x procs ns_user and ns_perm (in configure-new-service-2.tcl). I've updated those to current ns_perm syntax, but now it looks like ns_perm doesn't actually change the modules/nsperm/* files. I suppose the AOL 2.x versions actually updated the permission files.

I found another post somewhere that mentioned this, and suggested using regular Tcl commands to edit the files. So now I have (lines broken for clarity):







#ns_user add $server_name "$server_name reports account"
[ns_crypt $password rP] "users" "Automatically generated by the
reports server"
# AOL3
ns_perm adduser $server_name [ns_crypt $password rP] 
"$server_name reports account"
# Actually write this info to the nsperm passwd file...
set authfile [open APPEND ${nsperm_dir}/passwd]
puts $authfile "$server_name:[ns_crypt $password rP]: 
$server_name reports account::::"
close $authfile
and AOLserver isn't liking my open statement.









[12/Mar/2002:17:39:26][9530.5126][-conn0-] Error: 
invalid access mode 
"/web/ad331.13/servers/reports/modules/nsperm/passwd":
must be RDONLY, WRONLY, RDWR, APPEND, CREAT EXCL, NOCTTY,
NONBLOCK, or TRUNC
The file path is good, and I sure thought I was using the APPEND option correctly...

Any help would be much appreciated.
I'll be happy to document my journey if anyone's interested.
-db

try swapping the order of arguments... the syntax is
open fileName
open fileName access
open fileName access permissions
the documentation at http://tcl.activestate.com/man/tcl8.3/ TclCmd/contents.htm is your friend...
Now how did I miss that?  I feel really stupid now...

Thanks for setting me straight Russell.