bin/*: Use plain `/usr/bin/tclsh' in shebang lines.
[ca] / bin / setup
index 845c2a4..b0e2226 100755 (executable)
--- a/bin/setup
+++ b/bin/setup
@@ -1,4 +1,4 @@
-#! /usr/bin/tclsh8.5
+#! /usr/bin/tclsh
 ### -*-tcl-*-
 ###
 ### Initialize a new certificate authority.
@@ -67,9 +67,12 @@ exec >@stdout 2>@stderr openssl req -config "etc/openssl.conf"  \
     -text -out "ca.cert" -keyout "private/ca.key" \
     -new -x509 -days $C(ca-period) \
     -subj $subject
-file attributes "ca.cert" \
+file attributes "private/ca.key" \
     -owner $C(ca-owner) -group $C(ca-group) \
     -permissions 0640
+file attributes "ca.cert" \
+    -owner $C(ca-owner) -group $C(ca-group) \
+    -permissions 0644
 
 ## Set up the directories for the actual certificates.  These are published
 ## by the web server.