[arch-general] wrong file permissions in /var/lib/pacman/local

Hubert Grzeskowiak arch-general-ml at nemesis13.de
Fri Dec 12 18:17:51 EST 2008


Aaron Griffin schrieb:
> On Fri, Dec 12, 2008 at 4:25 PM, Dan McGee <dpmcgee at gmail.com> wrote:
>> On Fri, Dec 12, 2008 at 4:03 PM, Hubert Grzeskowiak
>> <arch-general-ml at nemesis13.de> wrote:
>>> Aaron Griffin schrieb:
>>>> On Fri, Dec 12, 2008 at 2:20 PM, Hubert Grzeskowiak
>>>> <arch-general-ml at nemesis13.de> wrote:
>>>>> Hubert Grzeskowiak schrieb:
>>>>>> Aaron Griffin schrieb:
>>>>>>> On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak
>>>>>>> <arch-general-ml at nemesis13.de> wrote:
>>>>>>>> Aaron Griffin schrieb:
>>>>>>>>> On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak
>>>>>>>>> <arch-general-ml at nemesis13.de> wrote:
>>>>>>>>>> hi there,
>>>>>>>>>> can it be, that the some dirs written to /var/lib/pacman/local/* are not
>>>>>>>>>> chmod'ed properly? sometimes i get errors because as user i don't have
>>>>>>>>>> the permissions to do anything with it (it's set to drwx------). this
>>>>>>>>>> only occurs on some packages (eg. the new nmap package). other dirs and
>>>>>>>>>> files inside all (also the corrupted) directories seem okay (files:
>>>>>>>>>> -rw-r--r--; dirs: drwxr-xr-x)
>>>>>>>>>>
>>>>>>>>>> i played around with umask and sudo (always used on de-/installations)
>>>>>>>>>> with no result -everything was okay- so i conclude it's a per-package
>>>>>>>>>> problem.
>>>>>>>>> It's not, those files are not installed directly out of the package -
>>>>>>>>> pacman writes them itself.
>>>>>>>>>
>>>>>>>>> What is root's umask?
>>>>>>>>>
>>>>>>>> root's and user's umask is the same: 0077
>>>>>>> Can you try setting it to 0022 (the default, and what I have on my
>>>>>>> system) and see if the problem persists? If it does not, we then know
>>>>>>> the cause...
>>>>>>> Still, pacman's explicit chmod of this dir should fix this... gah.
>>>>>>>
>>>>>>> Dan, does pacman also explicitly set its own umask anywhere?
>>>>>>>
>>>>>> ok. gonna change it before updating the next time
>>>>>>
>>>>> upgraded as root with umask 0022 and it's all okay.
>>>> That's so weird... so pacman's umask setting just doesn't work?
>>>>
>>> either that or it's sudo. i've only tested it with the default umask so
>>> far and without sudo. if the bug would appear there, it would be easy to
>>> say that it's pacman setting his own strange permissions.
>>>
>>> i think, we need a few more tests for a precise statement:
>>> -sudo pacman with non-default umask
>>> -su/root pacman with non-default umask
>>> sry that i don't make it myself, but i'm currently kinda out of time
>>> unfortunately.
>> sudo might do some weird LD_PRELOAD magic, causing the umask() syscall
>> to not really work right- that is my best guess.
> 
> Oh la la. Thank you Xyne!
> http://bbs.archlinux.org/viewtopic.php?id=59483
> 
so we have the reason now, but not a solution at all. should we yell at
the sudo devs now or patch it ourselves (what would be against arch's
ideals)? a pacman hack would be possible, too, but an exception for sudo
is kinda dirty. i don't want to reorganize my system settings for a
so-called feature in sudo and i'm sure there are many others thinking
the same way.

H.G.


More information about the arch-general mailing list