Package: debmirror
Version: 1:2.4.4
Severity: normal

Hallo Frans,

My "debmirror" is also updated by another unix user
as the unix user that does `debmirror`.

To allow both operating system user to update the archive,
I have put them in the same unix group and SGID the dir.

However the debmirror does 'mkdir' hardcoded with mode 755
and blocks so the user on updates in the same directory.

My workaround is now
--- debmirror.upstream  2010-03-25 19:13:29.000000000 +0100
+++ debmirror   2010-07-17 12:42:17.000000000 +0200
@@ -2253,7 +2253,7 @@
       $current.="$part/";
       if (! $seen{$current}) {
        if (! -d $current) {
-         mkdir ($current, 0755) or die "mkdir failed: $!";
+         mkdir ($current, 0775) or die "mkdir failed: $!";
          debug("Created directory: $current");
        }
        $seen{$current}=1;


An cleaner solution would be
--- debmirror.upstream  2010-03-25 19:13:29.000000000 +0100
+++ debmirror   UNTESTED
@@ -2253,7 +2253,7 @@
       $current.="$part/";
       if (! $seen{$current}) {
        if (! -d $current) {
-         mkdir ($current, 0755) or die "mkdir failed: $!";
+         mkdir ($current, (0777 and not(umask))) or die "mkdir failed: $!";
          debug("Created directory: $current");
        }
        $seen{$current}=1;

The '0777 and not(umask)' will create group writeable directory when
the umask is 002. With default umask, 022, becomes the directory 
only owner writeable.


Groeten
Geert Stappers



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to