[ckan-changes] commit/ckan-debs-public: jame... at okfn.org: Changes to file permissions

Bitbucket commits-noreply at bitbucket.org
Wed Jun 15 16:28:42 UTC 2011


1 new changeset in ckan-debs-public:

http://bitbucket.org/okfn/ckan-debs-public/changeset/81ce513c4951/
changeset:   81ce513c4951
user:        jame... at okfn.org
date:        2011-06-15 18:28:36
summary:     Changes to file permissions
affected #:  1 file (610 bytes)

--- a/ckan-common/usr/lib/ckan/common.sh	Wed Jun 15 15:29:41 2011 +0000
+++ b/ckan-common/usr/lib/ckan/common.sh	Wed Jun 15 17:28:36 2011 +0100
@@ -24,12 +24,20 @@
 ckan_set_log_file_permissions () {
     local INSTANCE
     INSTANCE=$1
-    touch /var/log/ckan/${INSTANCE}/${INSTANCE}.log
-    touch /var/log/ckan/${INSTANCE}/${INSTANCE}[1-9].log
-    chmod g+w /var/log/ckan/${INSTANCE}/${INSTANCE}.log
-    chmod g+w /var/log/ckan/${INSTANCE}/${INSTANCE}[1-9].log
-    chown www-data:ckan${INSTANCE} /var/log/ckan/${INSTANCE}/${INSTANCE}.log
-    chown www-data:ckan${INSTANCE} /var/log/ckan/${INSTANCE}/${INSTANCE}[1-9].log
+    sudo chown www-data:ckan${INSTANCE} /var/log/ckan/${INSTANCE}
+    sudo chmod g+w /var/log/ckan/${INSTANCE}
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}1.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}2.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}3.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}4.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}5.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}6.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}7.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}8.log
+    sudo touch /var/log/ckan/${INSTANCE}/${INSTANCE}9.log
+    sudo chmod g+w /var/log/ckan/${INSTANCE}/${INSTANCE}*.log
+    sudo chown www-data:ckan${INSTANCE} /var/log/ckan/${INSTANCE}/${INSTANCE}*.log
 }
 
 ckan_ensure_users_and_groups () {
@@ -58,9 +66,9 @@
         mkdir -p -m 0755 /etc/ckan/${INSTANCE}
         mkdir -p -m 0750 /var/lib/ckan/${INSTANCE}{,/static}
         mkdir -p -m 0770 /var/{backup,log}/ckan/${INSTANCE} /var/lib/ckan/${INSTANCE}/{data,sstore,static/dump}
-        chgrp ckan${INSTANCE} /var/lib/ckan/${INSTANCE}
-        chgrp ckan${INSTANCE} /var/backup/ckan/${INSTANCE}
-        chgrp ckan${INSTANCE} /var/log/ckan/${INSTANCE}
+        sudo chown ckan${INSTANCE}:ckan${INSTANCE} /etc/ckan/${INSTANCE}
+        sudo chown www-data:ckan${INSTANCE} /var/{backup,log}/ckan/${INSTANCE} /var/lib/ckan/${INSTANCE} /var/lib/ckan/${INSTANCE}/{data,sstore,static/dump}
+        sudo chmod g+w /var/log/ckan/${INSTANCE} /var/lib/ckan/${INSTANCE}/{data,sstore,static/dump}
     fi
 }

Repository URL: https://bitbucket.org/okfn/ckan-debs-public/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list