[Pkg-owncloud-commits] [SCM] owncloud.git branch, master, updated. debian/4.0.1debian-2-26-g3f13bfe

Paul van Tilburg paulvt at debian.org
Sat Jun 16 11:12:19 UTC 2012


The following commit has been merged in the master branch:
commit c245ebe6aa12a57d497c2f95d7ded8034d7482c7
Author: Paul van Tilburg <paulvt at debian.org>
Date:   Sat Jun 16 12:55:10 2012 +0200

    Ensure the config file permissions are correct using postinst, not rules

diff --git a/debian/changelog b/debian/changelog
index 3d02ef4..6bbf79e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
 owncloud (4.0.2debian-1) UNRELEASED; urgency=low
 
   * New upstream bugfix release.
-  * debian/postinst: check whether a2enmod and apache2ctl are available
-    (as apache2 need not be installed) (closes: #676319).
+  * debian/postinst:
+    - Check whether a2enmod and apache2ctl are available (as apache2 need
+      not be installed) (closes: #676319).
+    - Ensure that the ownership of permissions of /etc/owncloud/config.php
+      and /etc/owncloud/htaccess are correct.
   * debian/patches:
     - Added fix_tar_require.diff to make the require path
       not point to 3rdparty/ so that Archive/Tar.php from php-pear is used
@@ -14,11 +17,11 @@ owncloud (4.0.2debian-1) UNRELEASED; urgency=low
       config (/etc/owncloud).
     - Updated 05_no_app_store.diff to set the "appstoreenabled" default in
       the source (and configuration example) universally to "false".
-  * debian/watch: updated to use the new releases page.
   * debian/rules, debian/owncloud.install, debian/owncloud.links,
     debian/owncloud.README.Debian, debian/config/:
     Install stuff to /usr/share/owncloud and link data, backup, themes and
     configuration dirs instead of the other way around (closes: TODO).
+  * debian/watch: updated to use the new releases page.
 
  -- Paul van Tilburg <paulvt at debian.org>  Sun, 10 Jun 2012 21:08:16 +0200
 
diff --git a/debian/postinst b/debian/postinst
index f8d7597..d647c5d 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -41,6 +41,15 @@ case "$1" in
             # /etc/apache2/conf.d/owncloud.conf.
             reload_apache restart
         fi
+        # Fix ownership and permissions of existing configuration.
+        if [ -f /etc/owncloud/config.php ]; then
+            chown www-data:www-data /etc/owncloud/config.php
+            chmod 0640 /etc/owncloud/config.php
+        fi
+        if [ -f /etc/owncloud/htaccess ]; then
+            chown www-data:www-data /etc/owncloud/htaccess
+            chmod 0640 /etc/owncloud/htaccess
+        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/rules b/debian/rules
index cf9979e..30e5885 100755
--- a/debian/rules
+++ b/debian/rules
@@ -84,8 +84,6 @@ override_dh_install:
 override_dh_fixperms:
 	dh_fixperms -X var/lib/owncloud
 	chown www-data:www-data debian/owncloud/etc/owncloud/
-	chown www-data:www-data debian/owncloud/etc/owncloud/htaccess
-	chmod 0640 debian/owncloud/etc/owncloud/htaccess
 	chown www-data:www-data debian/owncloud/var/lib/owncloud/data/
 	chmod 2770 debian/owncloud/var/lib/owncloud/data/
 	chown www-data:www-data debian/owncloud/var/lib/owncloud/backup/

-- 
owncloud.git



More information about the Pkg-owncloud-commits mailing list