fix ownership and permissions of the cgi-script and its parent dirs during installation
--- a/Build.PL Fri Jul 15 14:22:21 2011 +0200
+++ b/Build.PL Fri Jul 15 15:39:28 2011 +0200
@@ -24,6 +24,16 @@
print $c 'Depends: ', join ', ', map { "$_$deps{$_}" } keys %deps;
system('equivs-build', $c->filename);
}
+ sub ACTION_install {
+ my $self = shift;
+ my $h = ($self->install_path('cgi-bin') =~ m|^(.*)/cgi-bin$|)[0] ;
+ my $u = my $g = ($h =~ m|/([^/]+)$|)[0];
+ system(qw(chown -R), "$u:$g", $h) == 0
+ or die "Can't 'chown -R $u:$g $h': $!";
+ system(qw(chmod -R go=,-st), $h) == 0
+ or die "Can't 'chmod -R go=,-st $h";
+ $self->SUPER::ACTION_install;
+ }
___CODE
);