Broken X - Only works for root
Hello everyone, I've managed to break my X for everyone apart from root, and i'm not entirely sure how. The problem seems to be one of permissions. Running startx as a user gives the error:
Quote:
Looking through ~/.xsession-errors Quote:
Oh yeah, and there was a previous error with startx from a user, about moving log files. I had to delete them and make /var/log world rwxable. I can't do this with xf86OpenConsole cos it isn't an external prog, and anyway, this seems to be a fundamental problem, which should have a fundamental solution... Anyway, if you make any sense out of that minddump, and have any ideas I'd be very grateful. I have no idea where to go from here, and running everything as root just scares me. Cheers! -BBP |
I would install Yellow Dog linux if I were you and give up on a good distro like Slackware.
|
Is your XFree86 with permission:
-rws--x--x Run: ls -l /usr/X11/bin/XFree86 to find this out. If not, suggest set the permission correctly for this binary. Hope this help... |
Cheers Ghostdancer, that's actually something i didn't get round to checking. Unfortunately XFree86 already world x-ecutable (i assume you meant -rwx--x--x, right?) as are aterm and xterm. Back to square 1.
But suddenly ptsname and pt_chown in the error message are ringing a bell.. I'm getting a problem with /dev/pts at startup... I'll google it and check it out. But if anyone has any ideas... Thanks anyway ghostdancer. And teamstatic, why would i want to ditch slackware? It's my fault, not slack's. Slack is the best distro i've used yet. |
well, that worked. Recompiled kernel with pts support on and everything's cool. Guess the fact that it was v. terminals not working should have given me a clue. Weird error msgs tho... anyway, thanks for your help.
|
X is traditionally set-uid root, as ghostdancer pointed out.
(-rws--x--x root ...) When you run a binary as a normal user, it executes as a process with your id, so it can't write to any files that you don't have write access to. Setting other files to be world-writable is not a good solution to the problem, as other users may be able to exploit the system in various ways. When X runs set-uid root, it has permission to manipulate various files and devices that unpriviledged users can't (and shouldn't) modify. |
Ah, i see... sorry, there's another gap in my knowledge plugged ;)
So it turns out I had two problems, and i only discovered the second when i tried to fix the first. Thanks guys! By the way, its safe to have full access to /var/log isn't it? Or should i put things back? |
full access to /var/log allows an intruder to change files to hide themselves better.
|
ha, very good point. Sorry for being such a retard, I'll go fix it.
|
Quote:
aterm: can't open slave tty /dev/ttyp1 pt_chown: needs to be installed setuid `root' xterm: Error 18, errno 13: Permission denied >> chmod 4755 /usr/libexec/pt_chown OR #chown root xterm #chmod 4755 xterm Do the same for aterm Kool, just_Hum |
Wow... Resurecting a 5 year old post to add another reply. That HAS to be some kind of a record or something...
|
Quote:
kool, just_Hum |
All times are GMT -5. The time now is 04:26 AM. |