[Pkg-owncloud-commits] [owncloud] 01/01: Don’t change ownership of config files on upgrade

David Prévot taffit at moszumanska.debian.org
Sat Aug 2 15:44:43 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 7929c48aac4fd87342b5980db456001e26ef2229
Author: David Prévot <taffit at debian.org>
Date:   Sat Aug 2 11:41:51 2014 -0400

    Don’t change ownership of config files on upgrade
    
    Rather set it up inside the package, and respect administrator changes
    in etc/.
    
    Closes: #756846
---
 debian/postinst | 9 ---------
 debian/rules    | 2 ++
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 2b35fd5..b4a6edb 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -41,15 +41,6 @@ case "$1" in
 			reload_apache restart
 		fi
 	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
 	# Create empty logfile if needed
 	file=/var/log/owncloud.log
 	if [ ! -f $file ]; then
diff --git a/debian/rules b/debian/rules
index 064790b..c0a82b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -123,6 +123,8 @@ 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
 	for i in assets data backup ; do \
 		chown www-data:www-data debian/owncloud/var/lib/owncloud/$$i && \
 		chmod 2770 debian/owncloud/var/lib/owncloud/$$i ; \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list