[arch-general] wrong file permissions in /var/lib/pacman/local
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. is anybody else encountering this? thx in advance Hubert Grzekowiak
On Thu, Dec 11, 2008 at 13:47, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
hi there, <snip> is anybody else encountering this?
thx in advance Hubert Grzekowiak
Daenyth Blank wrote:
On Thu, Dec 11, 2008 at 13:47, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
hi there, <snip> is anybody else encountering this?
thx in advance Hubert Grzekowiak
so in fact it's unsure what causes this... great. gonna make an alias for chmodding the dirs after each DB change as a temporary workaround and look forward for a patch. thx Daenyth
On Donnerstag, 11. Dezember 2008 21:42 Hubert Grzeskowiak wrote:
so in fact it's unsure what causes this... great. gonna make an alias for chmodding the dirs after each DB change as a temporary workaround and look forward for a patch.
Opening a root shell with "su -" or "sudo -i" is not an option for you? See you, Attila
Attila schrieb:
On Donnerstag, 11. Dezember 2008 21:42 Hubert Grzeskowiak wrote:
so in fact it's unsure what causes this... great. gonna make an alias for chmodding the dirs after each DB change as a temporary workaround and look forward for a patch.
Opening a root shell with "su -" or "sudo -i" is not an option for you?
See you, Attila
i don't use su - call me paranoid, but i think it's too dangerous and in this case even the smallest danger is unnecessary i'm not sure what sudo -i makes in detail, but would it solve this problem? H.G.
On Donnerstag, 11. Dezember 2008 22:55 Hubert Grzeskowiak wrote:
i don't use su - call me paranoid, but i think it's too dangerous and in this case even the smallest danger is unnecessary
No problem to be paranoid because it could helps. I have the same problem with sudo.-)
i'm not sure what sudo -i makes in detail, but would it solve this problem?
"sudo -i" simulate initial login. See better the man page of sudo because the english there is very much better than mine. Personally i prefer to use this both solutions for a "real root login" because root and my user have a different umask. See you, Attila
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@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?
Aaron Griffin schrieb:
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@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
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Aaron Griffin schrieb:
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@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?
Aaron Griffin schrieb:
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Aaron Griffin schrieb:
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 -
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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
Hubert Grzeskowiak schrieb:
Aaron Griffin schrieb:
Aaron Griffin schrieb:
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 -
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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. H.G.
On Fri, Dec 12, 2008 at 2:20 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Hubert Grzeskowiak schrieb:
Aaron Griffin schrieb:
Aaron Griffin schrieb:
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 -
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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?
Aaron Griffin schrieb:
On Fri, Dec 12, 2008 at 2:20 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Hubert Grzeskowiak schrieb:
Aaron Griffin schrieb:
Aaron Griffin schrieb:
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@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
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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. cya H.G.
On Fri, Dec 12, 2008 at 4:03 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Aaron Griffin schrieb:
On Fri, Dec 12, 2008 at 2:20 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Hubert Grzeskowiak schrieb:
Aaron Griffin schrieb:
Aaron Griffin schrieb: > On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak > <arch-general-ml@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
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: 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. -Dan
On Fri, Dec 12, 2008 at 4:25 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Fri, Dec 12, 2008 at 4:03 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Aaron Griffin schrieb:
On Fri, Dec 12, 2008 at 2:20 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Hubert Grzeskowiak schrieb:
Aaron Griffin schrieb:
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote: > Aaron Griffin schrieb: >> On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak >> <arch-general-ml@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
Aaron Griffin schrieb:
On Fri, Dec 12, 2008 at 4:25 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Fri, Dec 12, 2008 at 4:03 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Aaron Griffin schrieb:
On Fri, Dec 12, 2008 at 2:20 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Hubert Grzeskowiak schrieb:
Aaron Griffin schrieb: > On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak > <arch-general-ml@nemesis13.de> wrote: >> Aaron Griffin schrieb: >>> On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak >>> <arch-general-ml@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.
setting user's umask to 0022 before sudo pacman works and it's independent of root's umask. H.G.
I have not seen any more messages about this question... Just one bit of information: I have had this problem in one of my machines, and I have not even installed sudo. Regards, Guillermo -----Mensaje original----- De: arch-general-bounces@archlinux.org [mailto:arch-general-bounces@archlinux.org] En nombre de Hubert Grzeskowiak Enviado el: domingo, 14 de diciembre de 2008 23:30 Para: arch-general@archlinux.org Asunto: Re: [arch-general] wrong file permissions in /var/lib/pacman/local setting user's umask to 0022 before sudo pacman works and it's independent of root's umask. H.G.
On Freitag, 12. Dezember 2008 23:03 Hubert Grzeskowiak wrote:
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 it is sudo because there was a bugreport in the past about bad file permissions for the changelog files and the pacman dev(s) invest a lot to prevent such cases where umask is the problem. I hope i'm right with this.
-su/root pacman with non-default umask
If you type su instead of "su -" than root (or the user you choose) get the umask of the user who starts this. At the end i must say that i don't realy understand what speak against a "real root login" to do the jobs with pacman. To only know if there be new updates it is enough to run a cronjob which send an email of the output from "pacman -Syup" to the user acount and than you have to run pacman as root only for updates or other things. But this be only my 2c. See you, Attila
On Thu, Dec 11, 2008 at 2:50 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Thu, Dec 11, 2008 at 2:46 PM, Hubert Grzeskowiak <arch-general-ml@nemesis13.de> wrote:
Aaron Griffin schrieb:
On Thu, Dec 11, 2008 at 12:47 PM, Hubert Grzeskowiak <arch-general-ml@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?
Yeah, that bug report points you directly to the code where that happens: http://projects.archlinux.org/?p=pacman.git;a=blob;f=lib/libalpm/be_files.c;...
participants (6)
-
Aaron Griffin
-
Attila
-
Daenyth Blank
-
Dan McGee
-
Guillermo Leira
-
Hubert Grzeskowiak