1
--- checksetup.pl 2004-10-26 15:58:12.000000000 +0200
2
+++ checksetup.pl 2004-12-02 10:40:13.000000000 +0100
7
+# the Debian way of fixing permissions
8
+# Comes from bugzilla.postinst.
9
+sub fix_www_data_perm {
11
+ system(qq{chown -R www-data.www-data $path}) == 0
12
+ or die "Can't fix owner of files under $path : $!";
13
+ system(qq{find $path -type f -print0 | xargs -0 chmod 644}) == 0
14
+ or die "Can't fix $path/* files perm : $!";
15
+ system(qq{find $path -type d -print0 | xargs -0 chmod 755}) == 0
16
+ or die "Can't fix $path/* dirs perm : $!";
20
# This was originally clipped from the libnet Makefile.PL, adapted here to
21
# use the above vers_cmp routine for accurate version checking.
22
@@ -3034,5 +3046,13 @@
26
+# Now fixing the right permissions ala bugzilla.postinst.
27
+# Doing this here is better : it will allow user to run
28
+# checksetup.pl by hand without breaking bugzilla.
30
+print "Fixing permissions for www-data...\n";
31
+fix_www_data_perm('/var/lib/bugzilla'); #this should be done by checksetup.pl
32
+fix_www_data_perm('/var/cache/bugzilla'); #but I dislike the way this is done.
34
unlink "$var_dir/data/versioncache";
36
--- debian/bugzilla.postinst 2004-12-02 10:54:52.000000000 +0100
37
+++ debian/bugzilla.postinst 2004-12-02 10:40:21.000000000 +0100
39
system ($temp) / 256 == 0
40
or die "Problem with debhelper scripts: $!";
42
-fix_www_data_perm('/var/lib/bugzilla'); #this should be done by checksetup.pl
43
-fix_www_data_perm('/var/cache/bugzilla'); #but I dislike the way this is done.
48
or die "Can't change the owner of /etc/bugzilla/localconfig";
51
-sub fix_www_data_perm {
53
- system(qq{chown -R www-data.www-data $path}) == 0
54
- or die "Can't fix owner of files under $path : $!";
55
- system(qq{find $path -type f -print0 | xargs -0 chmod 644}) == 0
56
- or die "Can't fix $path/* files perm : $!";
57
- system(qq{find $path -type d -print0 | xargs -0 chmod 755}) == 0
58
- or die "Can't fix $path/* dirs perm : $!";
62
my @databases = $dbh->func('_ListDBs');