You are not logged in.

#1 2005-05-24 18:54:06

bardo
Member
Registered: 2004-12-06
Posts: 96

Libraries/headers permissions

Don't know if this is only a problem of mine: often, when trying to compile code, I get lots of "Permission denied" errors, and the only things I can do are either build as root (but I shouldn't) or change library permissions by hand.

Doesn't a policy for library permissions exist, when building Arch packages?


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#2 2005-05-24 19:11:36

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Libraries/headers permissions

I've never had a problem with library permissions... which ones are you talking about specifically

Offline

#3 2005-05-24 19:38:18

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Libraries/headers permissions

I think that you try to install files directly in the system instead of in $startdir/pkg.   Post  the PKGBUILD or the exact error messages.

Offline

#4 2005-05-24 20:04:02

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Libraries/headers permissions

Snowman wrote:

I think that you try to install files directly in the system instead of in $startdir/pkg.   Post  the PKGBUILD or the exact error messages.

No, the builds are all right. See, for example, ndiswrapper in the AUR. If as a user I try to build it, I get this output:

[...]
make[1]: Entering directory `/home/bardo/aur/others/ndiswrapper/src/ndiswrapper-1.1/utils'
cc -Wall -g -DNDISWRAPPER_VERSION="1.1"    -c -o loadndisdriver.o loadndisdriver.c
loadndisdriver.c:15:20: /usr/include/stdlib.h: Permission denied
loadndisdriver.c:16:19: /usr/include/stdio.h: Permission denied
loadndisdriver.c:17:19: /usr/include/errno.h: Permission denied
loadndisdriver.c:18:20: /usr/include/string.h: Permission denied
loadndisdriver.c:19:20: /usr/include/libgen.h: Permission denied
loadndisdriver.c:21:22: /usr/include/sys/mman.h: Permission denied
loadndisdriver.c:23:23: /usr/include/sys/types.h: Permission denied
loadndisdriver.c:24:23: /usr/include/sys/ioctl.h: Permission denied
loadndisdriver.c:25:22: /usr/include/sys/stat.h: Permission denied
loadndisdriver.c:26:20: /usr/include/unistd.h: Permission denied
loadndisdriver.c:27:19: /usr/include/fcntl.h: Permission denied
In file included from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include/syslimits.h:7,
                 from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include/limits.h:11,
                 from loadndisdriver.c:28:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include/limits.h:122:61: /usr/include/limits.h: Permission denied
loadndisdriver.c:29:19: /usr/include/ctype.h: Permission denied
loadndisdriver.c:30:20: /usr/include/dirent.h: Permission denied
loadndisdriver.c:31:20: /usr/include/syslog.h: Permission denied
loadndisdriver.c:34:25: /usr/include/linux/ioctl.h: Permission denied
In file included from loadndisdriver.c:36:
../driver/loader.h:23: error: parse error before "size_t"
../driver/loader.h:23: warning: no semicolon at end of struct or union
../driver/loader.h:25: error: parse error before '}' token
../driver/loader.h:51: error: field `sys_files' has incomplete type
../driver/loader.h:55: error: field `bin_files' has incomplete type
loadndisdriver.c: In function `load_file':
loadndisdriver.c:69: error: `size_t' undeclared (first use in this function)
[...]

And here they go 'til (you can imagine it) build fails. Obviously, root has no problems.

But that happens with a variety of libraries, even the more common ones come to an error. I have got no access to /usr/X11R6/include!!!

[bardo@paradigm ~]$ ls /usr/X11R6/include/
ls: /usr/X11R6/include/: Permission denied

I'm starting to think there's something screwed up in my system. And I don't know how to fix it. Would something like this help?

for i in `pacman -Q | cut -f1 -d " "` ; do yes | pacman -S "$i" ; done

This way would I reinstall all the packages on my system getting the original permissions again?


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#5 2005-05-24 20:48:50

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Libraries/headers permissions

bardo:
what I think happened was pointed out by cactus a while back - pacman has the potential to change permissions on directories...
so, most likely a recent package changed the permissions on those dirs...

for /usr/X11R6/include, give world execute permissions in order to cd into it (is this the same thing with /usr/include?

Offline

#6 2005-05-24 21:27:33

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Libraries/headers permissions

Ok, tried reinstalling xorg and now the headers are accessible. Gonna launch my little script and reinstall everything.


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#7 2005-05-24 21:48:49

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Libraries/headers permissions

you can do "pacman --noconfirm" instead of "yes | pacman"... just a little FYI

Offline

#8 2005-05-24 22:05:59

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Libraries/headers permissions

phrakture wrote:

you can do "pacman --noconfirm" instead of "yes | pacman"... just a little FYI

Thanks, already started the process, but I'll keep it in mind, since it's useful for a couple of scripts I have written... wink

/me writes down again to RTFM big_smile


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#9 2005-05-24 22:09:50

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Libraries/headers permissions

bardo wrote:
phrakture wrote:

you can do "pacman --noconfirm" instead of "yes | pacman"... just a little FYI

Thanks, already started the process, but I'll keep it in mind, since it's useful for a couple of scripts I have written... wink

/me writes down again to RTFM big_smile

yeah, just keep in mind it can be dangerous... i.e. you use lilo and do "pacman --noconfirm -Syu" and don't notice the kernel upgrade... there's a few other situations, but it's mainly kernel stuff (the reason I IgnorePkg mine)

Offline

#10 2005-05-24 23:52:50

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Libraries/headers permissions

pacman -Sy `pacman -Q | cut -f1 -d " " | tr "n" " "`

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#11 2005-05-25 08:42:47

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: Libraries/headers permissions

cactus wrote:
pacman -Sy `pacman -Q | cut -f1 -d " " | tr "n" " "`

Nice one smile
Difference between mine and yours: I download and install the packages one by one, not all together. That's good for local packages, like the one I built from the AUR but are not in any repo. Your command, for example, fails when it finds torcs and stops. I should filter all these, and that's a very big work big_smile
My for cycle, instead, doesn't give a pacman smile if one iteration fails, it just goes on until the end wink


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

Board footer

Powered by FluxBB