Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Cc: meino.cramer@×××.de
Subject: Re: [gentoo-user] Weird (?) permission problem...
Date: Wed, 15 Dec 2010 16:10:21
Message-Id: 201012151809.14396.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] Weird (?) permission problem... by meino.cramer@gmx.de
1 Apparently, though unproven, at 17:20 on Wednesday 15 December 2010,
2 meino.cramer@×××.de did opine thusly:
3
4 > J. Roeleveld <joost@××××××××.org> [10-12-15 16:00]:
5 > > On Wednesday 15 December 2010 15:41:25 meino.cramer@×××.de wrote:
6 > > > Neil Bothwick <neil@××××××××××.uk> [10-12-15 15:40]:
7 > > > > On Wed, 15 Dec 2010 15:13:31 +0100, meino.cramer@×××.de wrote:
8 > > > > > And this happens to any mountpoint I mount that device on
9 > > > > > regardless of its perm settings before the mount
10 > > > >
11 > > > > With nothing mounted on it, the mount point's permission are those of
12 > > > > the directory. As soon as you mount something on it, the mount point
13 > > > > has the ownership and permissions of the root of the filesystem that
14 > > > > you just mounted there. In the same way that the contents of the
15 > > > > filesystem appear at the mount point, so does the metadata, so
16 > > > > change the permissions after mounting.
17 > > >
18 > > > ...unfortunately (as root)
19 > > >
20 > > > cd /tmp
21 > > > chmod 1777 .
22 > > >
23 > > > does not help...
24 > >
25 > > I don't think you can change the permissions like that.
26 > > Try:
27 > > cd /
28 > > chmod 1777 /tmp
29 > >
30 > > To remove the "s"-bits, try the following:
31 > > cd /
32 > > chmod u-s /tmp
33 > > chmod g-s /tmp
34 > >
35 > > This, however, needs to be done while the "/tmp" filesystem is mounted.
36 > > Otherwise you are only changing the mount-point (directory) not the
37 > > actual filesystem.
38 > >
39 > > --
40 > > Joost
41 >
42 > interesting...
43 > Until now, I thought '.' is equal to the directory I am in.
44
45 Usually it is, this is a special case
46
47 Every other action you could do with it resolves to the same thing no matter
48 what point of view you take.
49
50 chmod/chown changes the filesystem or mount point, which are different things.
51 So there's two command interpretations. It's all quite logical once you've
52 figured it out but even then most of us still never remember which is which...
53
54
55
56
57 >
58 > Ok, times is changing, me too, but as it seems not fast enough ;)
59 >
60 > Thanks a lot... thats fix it!
61 >
62 > Best regards,
63 > mcc
64
65 --
66 alan dot mckinnon at gmail dot com