Gentoo Archives: gentoo-server

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

Replies

Subject Author
Re: [gentoo-server] Weird permission problem trying to start Dante SOCKS server Jose Gonzalez Gomez <jgonzalez.openinput@×××××.com>