Package: apt-cacher-ng Version: 0.4.7-1 Severity: normal
Hello Eduard, My "apt cache" is also updated by another unix user as the unix user 'apt-cacher-ng'. To allow both operating system user to update the archive, I have put them in the same unix group and SGID the dir. However apt-cacher-ng does 'mkdir' hardcoded with mode 755 and blocks so the user on updating in the same directory. My workaround is now --- source/meta.cc.pristine +++ source/meta.cc @@ -35,7 +35,7 @@ for(UINT pos=0; pos<path.size(); pos=path.find("/", pos+1)) { if(pos>0) - mkdir(path.substr(0,pos).c_str(), 00755); + mkdir(path.substr(0,pos).c_str(), 00775); } } /* A cleaner solution would be --- source/meta.cc.pristine +++ source/meta.cc. UNTESTED @@ -35,7 +35,7 @@ for(UINT pos=0; pos<path.size(); pos=path.find("/", pos+1)) { if(pos>0) - mkdir(path.substr(0,pos).c_str(), 00755); + mkdir(path.substr(0,pos).c_str(), (00777 & !umask)); } } /* 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
signature.asc
Description: Digital signature