Gentoo Archives: gentoo-server

From: Jose Gonzalez Gomez <jgonzalez.openinput@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Weird permission problem trying to start Dante SOCKS server
Date: Tue, 03 Jan 2006 08:34:46
Message-Id: 306bf010601030031l1fc1d43dv@mail.gmail.com
In Reply to: Re: [gentoo-server] Weird permission problem trying to start Dante SOCKS server by Moises Silva
1 I have double checked user and group permissions, sockd belongs to the
2 daemon group, and I can't find anything that may be causing any trouble...
3 What do you mean with "the user does not have permissions for that group"?
4 About configuration, I've been using really simple configuration files just
5 to test this, so I don't think I'm missing anything here...
6
7 Thanks
8 Jose
9
10 2006/1/2, Moises Silva <moises.silva@×××××.com>:
11 >
12 > Hi José. One thing seems to be wrong, or does not make sense to me.
13 >
14 > I have never used Dante, but from reviewing a little code i can see
15 > the point where is failing is because is attempting to get the group
16 > you have configured to run, but the user does not have permissions for
17 > that group. Please make sure that the user you select (sockd) belongs
18 > to the group dante is asked to run on. Just an idea.
19 >
20 > sure you are not missing any obscure configuration? :)
21 >
22 > kind regards,
23 >
24 > On 1/2/06, Jose Gonzalez Gomez <jgonzalez.openinput@×××××.com> wrote:
25 > > Hi there,
26 > >
27 > > I'm facing a weird problem that seems to be related somehow to some
28 > > permission problem I can't identify. I'm trying to use the Dante SOCKS
29 > > server, that has three different users you may specify at its
30 > configuration
31 > > file. They should be the sockd user (id 101), but if I use it, I get the
32 > > following error while checking the configuration file (this error
33 > prevents
34 > > the service from starting):
35 > >
36 > > proxy ~ # /usr/sbin/sockd -V
37 > > Jan 2 16:45:31 (1136216731) sockd[0]: socks_seteuid(): old: 0, new: 101
38 > > Jan 2 16:45:31 (1136216731) sockd[0]: socks_reseteuid(): current: 101,
39 > new:
40 > > 0
41 > > Jan 2 15:45:31 (1136216731) sockd[0]: socks_reseteuid(): getpwuid(0):
42 > > Permission denied (errno = 13)
43 > > Jan 2 15:45:31 (1136216731) sockd[0]: sockdexit(): terminating
44 > >
45 > >
46 > > After googling around I found that getpwuid is a function that returns
47 > the
48 > > information associated with an entry in /etc/passwd for the given uid,
49 > and
50 > > socks_reseteuid seems to be the function used by Dante to switch from on
51 > > user to another one. So it seems when Dante runs as user 101 (sockd) the
52 > > call to getpwuid is failing due to a permission problem. I've checked
53 > users,
54 > > permissions on /etc/passwd, and can't find any reason why this would be
55 > > failing so any help would be greatly appreciated.
56 > >
57 > > More info:
58 > > proxy ~ # id root
59 > > uid=0(root) gid=0(root)
60 > >
61 > groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
62 > > proxy ~ # id sockd
63 > > uid=101(sockd) gid=2(daemon) groups=2(daemon)
64 > > proxy ~ # ls -l /etc/passwd
65 > > -rw-r--r-- 1 root root 1772 Dec 20 15:01 /etc/passwd
66 > > proxy ~ # cat /etc/passwd | grep root
67 > > root:x:0:0:root:/root:/bin/bash
68 > > operator:x:11:0:operator:/root:/bin/bash
69 > > proxy ~ # cat /etc/passwd | grep sockd
70 > > sockd:x:101:2:added by portage for dante:/etc/socks:/bin/false
71 > >
72 > > Any ideas????
73 > >
74 > > TIA, best regards
75 > > Jose
76 > >
77 >
78 >
79 > --
80 > "Su nombre es GNU/Linux, no solamente Linux, mas info en
81 > http://www.gnu.org"
82 >
83 > --
84 > gentoo-server@g.o mailing list
85 >
86 >

Replies

Subject Author
Re: [gentoo-server] Weird permission problem trying to start Dante SOCKS server Moises Silva <moises.silva@×××××.com>
Re: [gentoo-server] Weird permission problem trying to start Dante SOCKS server "Andreas Prieß" <ap@××××××××××.net>