You are not logged in.

#1 2008-11-26 07:12:13

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

pacman library permission error

I recompiled the packages firefox, xulrunner, and kernel26 today. I just performed a pacman -Qi on some package and got the error that /var/lib/pacman/local/kernel26-2.6.27.6-1 and /var/lib/pacman/local/firefox-3.0.4-1 could not be read. I checked those directories and discovered that they had 700 permissions, rather than 755. Easily fixed, but an odd problem to come across.

I find it an odd coincidence that the only two packages with that problem were ones I've recompiled recently (past 8 hours), but I also find it odd that the other recompiled package didn't have a problem. And the common denominator for the recompiled packages would seem to be that they were installed vi pacman -U, so if there was an error with the library updates it would be pacman's fault.

Anyone else have a problem similar to this?

Last edited by B-Con (2008-11-26 07:12:44)

Offline

#2 2008-11-26 07:18:31

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,481
Website

Re: pacman library permission error

This is about the fourth time I have seen this in the past couple of weeks...  Very strange given nothing pacman related has been updated in a while.

What is your umask?

Offline

#3 2008-11-26 07:21:48

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: pacman library permission error

umask is 0077 for both my user and root.

When a db folder is created, are it's permissions perhaps not explicitly set?

Last edited by B-Con (2008-11-26 07:22:46)

Offline

#4 2008-11-26 08:03:37

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,481
Website

Re: pacman library permission error

0077 is u=rwx,g=,o= which is your issue.  Your umask should be 0022.

Edit: I'm not familiar with the code pacman uses in creating the files in the db folder but it appears they just inherit the default permissions from the root user.  I wonder if it is possible to do something about that...

Offline

#5 2008-11-26 08:34:49

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: pacman library permission error

I've tended to keep that setting as a hang-over from multi-user machines, where I don't necessarily want anyone else viewing any of my files. On my home machine I don't suppose I need it, but I don't see any reason to change it. Just makes one less edit when I transfer .bashrc's around. tongue

The funny thing is, though, if if the new folders are inheriting those permissions, why aren't all folders showing up like that?

[edit]
Oh, I see, you mean root's umask should be 0022. I'd agree with that.

Last edited by B-Con (2008-11-26 08:35:16)

Offline

#6 2008-11-26 12:10:12

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: pacman library permission error

This is because of the recent changes to sudo (I've posted a thread about this, it's still in the ABS forum though because I thought it was an ABS issue at first: http://bbs.archlinux.org/viewtopic.php?id=59483).

Long story short: The sudo devs decided to change the way the sudo default umask works. If the user's umask is more restrictive than the default sudo one, sudo will use the user's mask now.

I think it's unbelievably stupid to force the user to change his umask to run things as root with sudo. I also wonder how many people borked file permissions all over their system because of this.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2008-11-26 12:14:56

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,481
Website

Re: pacman library permission error

Ah, this is why I have seen it several times lately...  Very interesting "feature".

Offline

#8 2008-11-26 14:43:12

rostoQ
Member
Registered: 2008-06-25
Posts: 40

Re: pacman library permission error

experienced the same in the last time on 2 different pcs, very annoying... at least now i understand what the reason is... thanks!

Offline

#9 2008-11-28 04:14:38

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: pacman library permission error

Thanks for the info, Xyne. That answers that question.

Bug report submitted regarding pacman and sudo playing together more nicely: http://bugs.archlinux.org/task/12263 .

Offline

Board footer

Powered by FluxBB