You are not logged in.

#1 2010-05-07 21:29:22

yabasta
Member
Registered: 2010-05-01
Posts: 167

ugh....file permissions borked

hi folks, seems ive really broken my shiny new arch64 install. file permissions for a lot of the major directories have changed - bin,boot,etc, usr, root,var,lib64. roxterm terminal refuses to load, and xterm wont let me log in to root. i was messing about with thunar and fwbackups, experimenting with file permissions to get fwbackups working, alas and alack hmm
am i going to need to reinstall?

Offline

#2 2010-05-07 21:36:01

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: ugh....file permissions borked

Sarah Palin says You Betcha!


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2010-05-07 21:42:27

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

really, theres no way round this?

Offline

#4 2010-05-07 22:02:06

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: ugh....file permissions borked

You could try reinstalling packages one by one. That should save you on reformatting and the initial setup thing.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2010-05-07 22:03:38

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

well, i cant run pacman as a normal user. the directories all have root as owner, but me as read only access

Offline

#6 2010-05-07 22:11:54

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: ugh....file permissions borked

Umm ... well, that is borked. May I smarmily suggest a Sledgehammer?

Or, why not run pacman as root?


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#7 2010-05-07 22:54:41

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: ugh....file permissions borked

You have to run pacman as root if you want to install stuff.

Offline

#8 2010-05-08 01:00:29

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: ugh....file permissions borked

Use a live cd and chmod 755 all the important folders like /bin, /sbin, /usr/bin, /usr/sbin, /var, boot and /etc. I'm not sure about /proc and /sys.
Also do 775 and chown -R ${USER}:users /home.

That should give you a sane default to work with.

If you need to reinstall a package you can do it from the live cd by using the -root <'path'>. With pacman -Qk you can check for missing files, in case you also deleted files.

Regards,
demian

Last edited by demian (2010-05-08 01:08:53)


no place like /home
github

Offline

#9 2010-05-08 06:28:56

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

sorry im quite a newb, whats the correct syntax for chmod 755? and 775?
-Edit-
Things might not be as bad as they first seemed. i rebooted my pc, and it seems i can log in to my box as root, and log into openbox as root - via startx. however, if i try to switch between root to normal user, then back to root ( before logging into openbox) it wont recognise the pw. So now i can log into my openbox desktop as root, which i know isnt recommended, what would be the way forward? this is all schoolboy stuff i know, sorry for my stupidity in advance - this is one of those mistakes in life that don't get repeated methinks
-Edit-
i can't log in to my openbox desktop as normal user, X won't have it. here's the X error

fatal server error :
cannot move old log file ("var/log/Xorg.0.log" to "var/log/Xorg.0.log.old"
xinit: no such file or directory
xinit: no such process

yet i can log in to X, and consequently openbox, as root. I am such an imbecile

Last edited by yabasta (2010-05-08 08:42:36)

Offline

#10 2010-05-08 11:36:35

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: ugh....file permissions borked

As i said, you need to change the permissions of the important folders.

Xinit fails because it's probably not executable. Either that or you deleted it. ls -l /usr/bin/xinit tells you (it should look like this: -rwxr-xr-x 1 root root 12K Apr  4 14:10 /usr/bin/xinit)

To spell it out for you, as root do:
chmod 755 /bin /sbin /usr/bin /usr/sbin /var (if you get errors that are connected with files in /boot or /etc, do chmod 755 for those paths too).
chmod 775 /home/yabasta
chown -R yabasta:yabasta /home/yabasta

When it all works again you might want to change permissions of /home/yabasta or network configuration files with unencrpyted passwords etc to more safe values.

Last edited by demian (2010-05-08 11:39:31)


no place like /home
github

Offline

#11 2010-05-08 13:37:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: ugh....file permissions borked

Arch's default for $HOME is <username>:users i.e. yabasta:users in this case.

Offline

#12 2010-05-08 19:05:45

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

Thankyou very much smile i can now log into openbox as a normal user. I had a problem with su not working, but researched the problem and found that /bin/su needed chmod +s for su to work properly. So that's another problem sorted.
However, i think there are still a few problems left for me to encounter concerning file permissions, including this one i know about....
I use roxterm usually, for general cli stuff, and for weechat-curses. ROXterm won't work now, gives the error message 'the new terminal's command failed to run'.
I can however use xterm, so i rooted up in xterm and removed roxterm and reinstalled via pacman. Still no joy, decided to try the xfce 'terminal', that just sits there with no prompt not doing a thing. Giving an error message 'Unable to register terminal sevice: did not recieve a reply' etc.
So i tried 'gnome-terminal', which gives the error message 'There was an error creating the child process for this terminal'. There is obviously an underlying terminal failing somewhere, that i'd imagine are related to the file permissions being changed. Are there certain file permissions needed to run a terminal, and what do they need applying to?

Offline

#13 2010-05-08 21:43:40

schen
Member
Registered: 2009-06-06
Posts: 468

Re: ugh....file permissions borked

I think all of these require VTE, which might be borked as well. An alternative I might suggest is urxvt.

Offline

#14 2010-05-08 22:03:52

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

It seems ive figured it out, not sure what VTE is. A little research online with similar problems suggested that i should check my normal user is added to group tty. It seems that somehow after id messed with the directory file permissions with root-thunar that id disappeared from the group. My tty group now reads 'tty: :5:yabasta' - i take it this is how it should look under normal circumstances?
I've found a couple of more app permissions that need sorting out too, fwbackups (not sure exactly what permissions it needs just yet) and strigi won't work with catfish anymore. hopefully i can work those out in the next day or so
oh, and also Demian you wrote

When it all works again you might want to change permissions of /home/yabasta or network configuration files with unencrpyted passwords etc to more safe values.

....what would be more safe values?
I'd like to thank everybody for all their help and advice in helping me get out of the silly hole i dug myself into too!

Last edited by yabasta (2010-05-08 22:04:27)

Offline

#15 2010-05-08 22:24:17

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: ugh....file permissions borked

chmod go-rwx


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#16 2010-05-08 22:33:07

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

and what will that do exactly?

Offline

#17 2010-05-08 22:46:08

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: ugh....file permissions borked

yabasta wrote:

and what will that do exactly?

Change permissions

man chmod

Offline

#18 2010-05-08 23:19:02

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

hmm, i fail to see how using 'go-rwx' would be secure. doesn't the o grant permissions to other users who are neither owners of a file or members of a files group? wouldnt 'ug-rwx' be more secure?

Offline

#19 2010-05-09 10:18:55

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: ugh....file permissions borked

sorry fsckd i got that all wrong i think, ive just been studying file permissions. go-rwx would take read write and execute access from group and users and just leave read write and execute access to owners if i'm right.

Offline

#20 2010-05-09 18:13:29

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: ugh....file permissions borked

Correct. Whatever the owners have will be left to them while group and others are denied read, write and execute. smile


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB