[LON-CAPA-cvs] cvs: loncom / request_ssl_key.sh

raeburn raeburn at source.lon-capa.org
Fri Jun 5 08:01:24 EDT 2015


raeburn		Fri Jun  5 12:01:24 2015 EDT

  Modified files:              
    /loncom	request_ssl_key.sh 
  Log:
  - Ensure lonKey.pem file has correct owner.
  
  
Index: loncom/request_ssl_key.sh
diff -u loncom/request_ssl_key.sh:1.2 loncom/request_ssl_key.sh:1.3
--- loncom/request_ssl_key.sh:1.2	Tue Jan 27 01:23:26 2009
+++ loncom/request_ssl_key.sh	Fri Jun  5 12:01:23 2015
@@ -40,6 +40,14 @@
     rm lonKey.pem
 else
     chmod 0400 lonKey.pem
+    CURROWNER=`stat -c %U lonKey.pem`
+    if [ $CURROWNER != $DESTUID ] ; then
+        chown $DESTUID:$DESTGROUP lonKey.pem
+        CURROWNER=`stat -c %U lonKey.pem`
+        if [ $CURROWNER != $DESTUID ] ; then
+            echo "$DESTUID is not the owner of $DESTDIR/lonKey.pem. As root you need to change ownership of this file to $DESTUID:$DESTGROUP."
+        fi
+    fi
 fi
 
 rm lonKey.enc




More information about the LON-CAPA-cvs mailing list