[gentoo-user] Weird (?) permission problem...
Hi, my /tmp has the permissions set to 1777 . And it is the mountpoint for an extra partitions holding the stuff of '/tmp/' When booting into single-user mode and unmounting /tmp and doing a ls -ld /tmp it shows drwxrwxrwt 45 root root 61440 2010-12-15 15:07 /tmp BUT as soon as I mount the device on /tmp and doing the same ls -ld again it shows drwsrwsrwt 45 root root 61440 2010-12-15 15:07 /tm That looks not ok to me. /etc/fstab has an entry which options field is set to default And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount What is the reason for this? Best regards, mcc
Re: [gentoo-user] Weird (?) permission problem...
Apparently, though unproven, at 16:13 on Wednesday 15 December 2010, meino.cra...@gmx.de did opine thusly: Hi, my /tmp has the permissions set to 1777 . And it is the mountpoint for an extra partitions holding the stuff of '/tmp/' When booting into single-user mode and unmounting /tmp and doing a ls -ld /tmp it shows drwxrwxrwt 45 root root 61440 2010-12-15 15:07 /tmp BUT as soon as I mount the device on /tmp and doing the same ls -ld again it shows drwsrwsrwt 45 root root 61440 2010-12-15 15:07 /tm That looks not ok to me. /etc/fstab has an entry which options field is set to default And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount What is the reason for this? What filesystem type? You probably have some defaults set that make it suid/sgid, but these things are filesystem-dependant and for that we need to know the type -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] Weird (?) permission problem...
On Wed, 15 Dec 2010 15:13:31 +0100, meino.cra...@gmx.de wrote: And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount With nothing mounted on it, the mount point's permission are those of the directory. As soon as you mount something on it, the mount point has the ownership and permissions of the root of the filesystem that you just mounted there. In the same way that the contents of the filesystem appear at the mount point, so does the metadata, so change the permissions after mounting. -- Neil Bothwick A real programmer never documents his code. It was hard to make, it should be hard to read signature.asc Description: PGP signature
Re: [gentoo-user] Weird (?) permission problem...
Neil Bothwick n...@digimed.co.uk [10-12-15 15:40]: On Wed, 15 Dec 2010 15:13:31 +0100, meino.cra...@gmx.de wrote: And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount With nothing mounted on it, the mount point's permission are those of the directory. As soon as you mount something on it, the mount point has the ownership and permissions of the root of the filesystem that you just mounted there. In the same way that the contents of the filesystem appear at the mount point, so does the metadata, so change the permissions after mounting. -- Neil Bothwick A real programmer never documents his code. It was hard to make, it should be hard to read ...unfortunately (as root) cd /tmp chmod 1777 . does not help... mcc
Re: [gentoo-user] Weird (?) permission problem...
On Wednesday 15 December 2010 15:41:25 meino.cra...@gmx.de wrote: Neil Bothwick n...@digimed.co.uk [10-12-15 15:40]: On Wed, 15 Dec 2010 15:13:31 +0100, meino.cra...@gmx.de wrote: And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount With nothing mounted on it, the mount point's permission are those of the directory. As soon as you mount something on it, the mount point has the ownership and permissions of the root of the filesystem that you just mounted there. In the same way that the contents of the filesystem appear at the mount point, so does the metadata, so change the permissions after mounting. ...unfortunately (as root) cd /tmp chmod 1777 . does not help... I don't think you can change the permissions like that. Try: cd / chmod 1777 /tmp To remove the s-bits, try the following: cd / chmod u-s /tmp chmod g-s /tmp This, however, needs to be done while the /tmp filesystem is mounted. Otherwise you are only changing the mount-point (directory) not the actual filesystem. -- Joost
Re: [gentoo-user] Weird (?) permission problem...
J. Roeleveld jo...@antarean.org [10-12-15 16:00]: On Wednesday 15 December 2010 15:41:25 meino.cra...@gmx.de wrote: Neil Bothwick n...@digimed.co.uk [10-12-15 15:40]: On Wed, 15 Dec 2010 15:13:31 +0100, meino.cra...@gmx.de wrote: And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount With nothing mounted on it, the mount point's permission are those of the directory. As soon as you mount something on it, the mount point has the ownership and permissions of the root of the filesystem that you just mounted there. In the same way that the contents of the filesystem appear at the mount point, so does the metadata, so change the permissions after mounting. ...unfortunately (as root) cd /tmp chmod 1777 . does not help... I don't think you can change the permissions like that. Try: cd / chmod 1777 /tmp To remove the s-bits, try the following: cd / chmod u-s /tmp chmod g-s /tmp This, however, needs to be done while the /tmp filesystem is mounted. Otherwise you are only changing the mount-point (directory) not the actual filesystem. -- Joost interesting... Until now, I thought '.' is equal to the directory I am in. Ok, times is changing, me too, but as it seems not fast enough ;) Thanks a lot... thats fix it! Best regards, mcc
Re: [gentoo-user] Weird (?) permission problem...
On Wednesday 15 December 2010 16:20:32 meino.cra...@gmx.de wrote: J. Roeleveld jo...@antarean.org [10-12-15 16:00]: On Wednesday 15 December 2010 15:41:25 meino.cra...@gmx.de wrote: Neil Bothwick n...@digimed.co.uk [10-12-15 15:40]: On Wed, 15 Dec 2010 15:13:31 +0100, meino.cra...@gmx.de wrote: And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount With nothing mounted on it, the mount point's permission are those of the directory. As soon as you mount something on it, the mount point has the ownership and permissions of the root of the filesystem that you just mounted there. In the same way that the contents of the filesystem appear at the mount point, so does the metadata, so change the permissions after mounting. ...unfortunately (as root) cd /tmp chmod 1777 . does not help... I don't think you can change the permissions like that. Try: cd / chmod 1777 /tmp To remove the s-bits, try the following: cd / chmod u-s /tmp chmod g-s /tmp This, however, needs to be done while the /tmp filesystem is mounted. Otherwise you are only changing the mount-point (directory) not the actual filesystem. -- Joost interesting... Until now, I thought '.' is equal to the directory I am in. That's true, but not entirely :) I don't think chmod is supposed to work that way :) Ok, times is changing, me too, but as it seems not fast enough ;) Times are changing, so are people, but there are too many changes occuring for people to pick the right changes :) Thanks a lot... thats fix it! You're welcome :) -- Joost
Re: [gentoo-user] Weird (?) permission problem...
Apparently, though unproven, at 17:20 on Wednesday 15 December 2010, meino.cra...@gmx.de did opine thusly: J. Roeleveld jo...@antarean.org [10-12-15 16:00]: On Wednesday 15 December 2010 15:41:25 meino.cra...@gmx.de wrote: Neil Bothwick n...@digimed.co.uk [10-12-15 15:40]: On Wed, 15 Dec 2010 15:13:31 +0100, meino.cra...@gmx.de wrote: And this happens to any mountpoint I mount that device on regardless of its perm settings before the mount With nothing mounted on it, the mount point's permission are those of the directory. As soon as you mount something on it, the mount point has the ownership and permissions of the root of the filesystem that you just mounted there. In the same way that the contents of the filesystem appear at the mount point, so does the metadata, so change the permissions after mounting. ...unfortunately (as root) cd /tmp chmod 1777 . does not help... I don't think you can change the permissions like that. Try: cd / chmod 1777 /tmp To remove the s-bits, try the following: cd / chmod u-s /tmp chmod g-s /tmp This, however, needs to be done while the /tmp filesystem is mounted. Otherwise you are only changing the mount-point (directory) not the actual filesystem. -- Joost interesting... Until now, I thought '.' is equal to the directory I am in. Usually it is, this is a special case Every other action you could do with it resolves to the same thing no matter what point of view you take. chmod/chown changes the filesystem or mount point, which are different things. So there's two command interpretations. It's all quite logical once you've figured it out but even then most of us still never remember which is which... Ok, times is changing, me too, but as it seems not fast enough ;) Thanks a lot... thats fix it! Best regards, mcc -- alan dot mckinnon at gmail dot com
[gentoo-user] Weird permission problem trying to start Dante SOCKS server
Hi there, I'm facing a weird problem that seems to be related somehow to some permission problem I can't identify. I'm trying to use the Dante SOCKS server, that has three different users you may specify at its configuration file. They should be the sockd user (id 101), but if I use it, I get the following error while checking the configuration file (this error prevents the service from starting): proxy ~ # /usr/sbin/sockd -V Jan 2 16:45:31 (1136216731) sockd[0]: socks_seteuid(): old: 0, new: 101 Jan 2 16:45:31 (1136216731) sockd[0]: socks_reseteuid(): current: 101, new: 0 Jan 2 15:45:31 (1136216731) sockd[0]: socks_reseteuid(): getpwuid(0): Permission denied (errno = 13) Jan 2 15:45:31 (1136216731) sockd[0]: sockdexit(): terminating After googling around I found that getpwuid is a function that returns the information associated with an entry in /etc/passwd for the given uid, and socks_reseteuid seems to be the function used by Dante to switch from on user to another one. So it seems when Dante runs as user 101 (sockd) the call to getpwuid is failing due to a permission problem. I've checked users, permissions on /etc/passwd, and can't find any reason why this would be failing so any help would be greatly appreciated. More info: proxy ~ # id root uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video) proxy ~ # id sockd uid=101(sockd) gid=2(daemon) groups=2(daemon) proxy ~ # ls -l /etc/passwd -rw-r--r-- 1 root root 1772 Dec 20 15:01 /etc/passwd proxy ~ # cat /etc/passwd | grep root root:x:0:0:root:/root:/bin/bash operator:x:11:0:operator:/root:/bin/bash proxy ~ # cat /etc/passwd | grep sockd sockd:x:101:2:added by portage for dante:/etc/socks:/bin/false Any ideas TIA, best regards Jose