SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
xf86OpenConsole: Server must be suid root
I can get in through gdm, but then some progs don't work (including xterm and aterm which i NEED).
Looking through ~/.xsession-errors
Quote:
pt_chown: needs to be installed setuid `root'
aterm: can't open slave tty /dev/ttyp1
pt_chown: needs to be installed setuid `root'
xterm: Error 18, errno 13: Permission denied
Reason: spawn: open() failed on ptsname
/var/log/messages: Permission denied
Apart from, obviously, how to fix it, i can't work out at all how i managed to break it. I've just been installing new fonts, so all i've done is changed some fontpaths in XF86Config and run ttmkfdir and mkfontdir, which ran without errors and couldn't really have done anything... it's very strange.
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
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?
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:
I can get in through gdm, but then some progs don't work (including xterm and aterm which i NEED).
Looking through ~/.xsession-errors
Apart from, obviously, how to fix it, i can't work out at all how i managed to break it. I've just been installing new fonts, so all i've done is changed some fontpaths in XF86Config and run ttmkfdir and mkfontdir, which ran without errors and couldn't really have done anything... it's very strange.
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
<<pt_chown: needs to be installed setuid `root'
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
Wow... Resurecting a 5 year old post to add another reply. That HAS to be some kind of a record or something...
It is not for record , people may get the same error if they are using this particular version .. So I thought this will help them. Also will try to find the posts which are older than this
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.