Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: firefox vs firefox-bin restored on kde session
Date: Tue, 27 Nov 2007 10:59:01
Message-Id: pan.2007.11.27.10.56.05@cox.net
In Reply to: Re: [gentoo-amd64] firefox vs firefox-bin restored on kde session by Beso
1 Beso <givemesugarr@×××××.com> posted
2 d257c3560711270039h58edc4e9iff4ea98c72df0841@××××××××××.com, excerpted
3 below, on Tue, 27 Nov 2007 09:39:03 +0100:
4
5 > anyway for what i know of kde sessions you just need to remove
6 > everything in:
7 >
8 > /var/tmp/kdecache-<user>
9 > /tmp/ksocket-<user>
10 >
11 > and have these directories writable (but if you login they should
12 > already be writable). just in case do a ls -l on them and see if they
13 > are at least drwxr--r-- 2 <user> users (this means that the directory
14 > is owned by the user, of group users which has full permissions, while
15 > the group members have read permission and the other users not in the
16 > users group have read permissions). this is the minimum required
17 > permissions for kde to run. if they're are lower (for the specific user)
18 > kde won't work.
19
20 Hmmm... this isn't entirely correct, as I run KDE as my desktop
21 environment of choice (and am running it now), and have neither of those
22 directories, let alone have them at those permissions. KDE (3.5.8) is
23 working just fine.
24
25 You may be describing the defaults (which IIRC are at least close to that
26 location, tho your permissions look strange to me), but as it happens,
27 both those locations are indirect. The actual location KDE uses (at
28 least here) is several subdirs deep in the user's homedir, with the
29 default apparently being symlinks to the locations you describe.
30 However, if you point those symlinks elsewhere (as I have)...
31
32 If I'm not mistaken, you will probably find the symlinks under ~/.kde3.5/.
33
34 In that subdir here, I have one symlink called tmp-<host> (host being the
35 machine's domain name), which points to /tmp/tmp-<user>/kde/kde-<user>.
36 That's KDE's tmpdir, and the path reflects the manual tweaking I've done
37 to better organize my system tmpdir by user. I simply pointed the
38 symlink at the desired location, and it stays that way.
39
40 The /var/tmp location you listed is similarly handled, only here,
41 /var/tmp is a symlink to the tmpfs mounted /tmp, so everything that'd go
42 in /var/tmp ends up in /tmp, which being tmpfs, is ensured to be just
43 that, temporary. (I have a script that runs at boot to setup the
44 necessary /tmp subdirs and give them the proper permissions so X and KDE
45 work.)
46
47 The problem I noticed was that with what would have been /var/tmp
48 recreated entirely clean at each boot, KDE was forgetting some useful
49 things. Most of them it reconstructed as necessary without issue, but
50 the favicons for my various knewsticker subscriptions would be blank for
51 sometime after reboot, and I didn't like that, so I decided I needed to
52 do something about it. Turns out that the location KDE actually uses is
53 again in ~/kde3.5, in this case, cache-<host>, which is normally a
54 symlink to /var/tmp/whatever. Again, by pointing that symlink elsewhere,
55 in this case to ~/config/cache/kdecache-<user>, I avoided the problem of
56 KDE forgetting this sort of cached content. Really, it doesn't belong
57 in /var/tmp anyway, but /var/cache or similar. However, I found it more
58 useful to keep it under my user's homedir, so that's where I pointed the
59 link.
60
61 OK, so that's where my similar dirs are located, and what pointers I had
62 to re-point to the new location. What about permissions?
63
64 Well, regardless of the permissions on the individual cache dir, the
65 user's homedir is set unreadable by other users. Therefore, it's
66 obviously NOT necessary for it to be readable by other users -- and I
67 can't see why it would need to be and find it a rather disturbing
68 security issue to even consider it, anyway. Why would I want stuff in my
69 cache readable by other users? Of course, it's really just me using it,
70 so no big deal, but certainly in a general multi-user situation, I'd find
71 it rather privacy invasive if other users, particularly those in other
72 groups (conceivably I may wish it to be readable by those in my group),
73 could browse my cache files at will! That said, the dir itself is 0750,
74 so rwxr-x---. Those in the same group could read it if it weren't under
75 the 700 permed homedir, but any random user, regardless of group
76 membership.
77
78 As for the tmpdir, /tmp/tmp-<user>/kde/kde-<user> is perms 0700 all the
79 way from the tmp-<user> level, so three nested subdirs deep of 0700
80 perms. Why on earth would another user need access to it?
81
82 So anyway, as I said, neither of those dirs have to be the given world-
83 read permissions, nor in fact do they even have to exist at all if the
84 user's ~/kde3.5/* symlinks to them are pointed elsewhere, for KDE to work
85 properly.
86
87 --
88 Duncan - List replies preferred. No HTML msgs.
89 "Every nonfree program has a lord, a master --
90 and if you use the program, he is your master." Richard Stallman
91
92 --
93 gentoo-amd64@g.o mailing list