You are not logged in.

#1 2007-08-03 02:44:51

AlmaMater
Member
Registered: 2007-02-28
Posts: 92

Permissions on "/opt" mess :O ,playing whit chmod, how to set default?

Hi all,

Today i installed ePSXe emulator found in AUR, after installations, i didnt had permition to execute the program, so i started playing whit chmod on /opt  (thats where the program is installed by default)
Afer seeng that i was giving "read and write" permittions for everyone (yeah im a noob lol) i decided to read a little more, before start trying again settings the permittions.

So i tried to set /opt permittions the way they were in the first play, after some reading i did a "chmod 755" and in properties i see that "Owner is rott whit R&W permittions, the group is "549"?? whit read only, and others whit read only aswell

So basically my questions, is tha tthe correct "defaulkt"?  since im stil new, i dont know why the group is 549 instead of root??  like in almost every other folders in "/ " ?? i say almost because in /usr i see olso the group 549

Is that normal?? is that the way it should be? or do i have to change the group of those folders to "root" (dunno how to do it but still)

Is chmod 755 the default on /opt??

Thanks
---------------------------
Here u can find the PKGBUILD of psxe http://aur.archlinux.org/packages/epsxe/epsxe/PKGBUILD
Is the permittions correct?? (i am in the "games" group)

Last edited by AlmaMater (2007-08-03 03:06:53)

Offline

#2 2007-08-03 05:45:26

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Permissions on "/opt" mess :O ,playing whit chmod, how to set default?

Run as root "chown root.root -R /opt; chmod 755 -R /opt" and you should be more or less okay.

Mother Tongue speaks to me in the strongest way I've ever seen?

Last edited by lucke (2007-08-03 05:47:36)

Offline

#3 2007-08-03 14:45:57

veek
Member
Registered: 2006-03-10
Posts: 167

Re: Permissions on "/opt" mess :O ,playing whit chmod, how to set default?

755 is the default for /opt, and it's owned by root and is part of the group root.

The chown command lucke posted will change the owner and group of everything in /opt to root.
The chmod will fix the permissions.  You can copy and paste that whole line into a terminal and it should straighten you out.

Offline

#4 2007-08-03 20:58:12

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Permissions on "/opt" mess :O ,playing whit chmod, how to set default?

I had the same sort of issue some time ago. along with the group value, check if you have some setgid bit somewhere on directories in your system... some shell command with test -g will help find them...

some tar files in aur do have this sgid bit set inside them, along with a group number, and it propagates like a virus because if you untar the pkgbuild, the dir has setgid, which will propagate to all subdirs, incl those in pkg/ in the build dir, which will then be merged on the filesystem with setgid bit, and then any subdir of the affected dirs will itself receive the setgid bit and group number.

so, with an example:
- a flawed AUR PKGBUILD tarball has a setgid bit+group number inside on its main directory
- untarred, it implies the sgid bit+group num to src/ and pkg/ when makepkg is run
- the package now has stuff in usr/lib  and usr/bin, which have been sgid+group num
- on pacman -U, the dirs /usr/bin /usr/lib and /usr on live fs receive the sgid bit+group num
- from then on, any dir created by any means under this will rceive sgid bit+group num...

it took me a couple of days to get where did this mess came from... and thanks to some people on irc, I finally found the cause of it.

Last edited by lloeki (2007-08-03 21:12:35)


To know recursion, you must first know recursion.

Offline

#5 2007-08-06 03:11:05

AlmaMater
Member
Registered: 2007-02-28
Posts: 92

Re: Permissions on "/opt" mess :O ,playing whit chmod, how to set default?

Thanks for the answers, i think i have now everything the way it was, i still want to install ePSXe, but looking the PKGBUILD, i cant find the error : s, ill just keep reading about it smile

Offline

Board footer

Powered by FluxBB