1 |
Paul Stear <gentoo@××××××××××××.com> posted |
2 |
200903090912.51323.gentoo@××××××××××××.com, excerpted below, on Mon, 09 |
3 |
Mar 2009 09:12:49 +0000: |
4 |
|
5 |
> Thanks for the replies, sorry I haven't been back in touch for a few |
6 |
> days. If I click Properties and select the Permissions tab the User is |
7 |
> -me(my user name), Group is root. On the access Permissions part the |
8 |
> Owner is set to "Can View Contents". |
9 |
> If I change this to "Can View & Modify Content" and click "OK" I get an |
10 |
> error message "Could not change permissions for /media/lomega HDD". I am |
11 |
> on kde3.10. |
12 |
> Their must be a way of defining default permissions for anything plugged |
13 |
> into the usb port. |
14 |
|
15 |
There is, but the old way, manual mounting and fstab configuration, while |
16 |
well documented doesn't always play well with hal and automounting, and |
17 |
the newer hal based automounting isn't as well documented -- or at least |
18 |
isn't as well understood by us old *ix types who tend to be a bit |
19 |
suspicious of automounting in the first place. |
20 |
|
21 |
Note that it's also possible to use udev to arrange custom device |
22 |
creation based on what's inserted. This at least has a reasonable level |
23 |
of documentation associated with it, and can be used to, for instance, |
24 |
always give your MP3 player or camera a stable device file regardless of |
25 |
whether other thumb drives and etc are inserted before it (thus changing |
26 |
the default device name) or not. Hal or fstab could then use that in |
27 |
their config to allow different mounting options (or indeed whether to |
28 |
mount by default or not) for different thumb drives and/or other USB mass |
29 |
storage devices. |
30 |
|
31 |
Here, I use a Label= entry in my fstab to determine how my mp3 player is |
32 |
loaded. Of course, it's vfat not ntfs, but the same idea should be |
33 |
usable with ntfs, I think (each of the below is all one line in fstab, |
34 |
two here for posting, uxx and gxx are of course numeric substitutions): |
35 |
|
36 |
## Dev/Part/LBL MntPnt Type |
37 |
MntOpt D F |
38 |
|
39 |
LABEL=Siren /m/siren vfat |
40 |
user,sync,uid=uxx,gid=gxx,noatime,nonumtail,noauto 0 0 |
41 |
|
42 |
As for hal... Naturally I have fstab entries for my dvd-writers as |
43 |
well. They work decently in most cases, but there was a hal related bug |
44 |
triggered by k3b at one point. After writing the image, k3b would eject |
45 |
and re-suck (heh, what else would it be called, it's not re-insert since |
46 |
it's pulling it in, not me pushing) the tray with the burned disk on it, |
47 |
then verify the image. Except that when it re-sucked the tray, hal |
48 |
interfered, trying to automount in /media as it was now a burned image, |
49 |
and k3b couldn't access the disk in ordered to verify the image. Various |
50 |
patches worked for some folks but broke it for others, until someone |
51 |
mentioned turning OFF the k3b option to eject after burning that /used/ |
52 |
to be necessary. That seemed to work. |
53 |
|
54 |
The point is, during all this I discovered that despite the fstab mount |
55 |
entry to mount in /mnt/dvd, hal was ignoring fstab and doing its own |
56 |
thing, trying to mount on /media/dvdname or some such. Thus the bit |
57 |
above about hal and its automount sometimes conflicting with the |
58 |
traditional fstab config. |
59 |
|
60 |
If you end up with a similar hal/fstab and possibly udev involving |
61 |
conflict, one thing you can do is simply tell the popup to do nothing, |
62 |
and then issue the mount option manually (and of course you can create a |
63 |
menu option to invoke a script to do that as appropriate). By issuing |
64 |
the mount option manually (or setting up an invokable script to do it for |
65 |
you), you can set your options to mount it the way you want, either on |
66 |
the mount commandline or in fstab. |
67 |
|
68 |
Surely there's a way to configure hal to do the same thing, but I don't |
69 |
know it, and am old school enough to be a bit suspicious of its |
70 |
automounting anyway, especially when it ignores the clearly established |
71 |
policy in fstab(!!), so I've not bothered looking more deeply into it. |
72 |
|
73 |
-- |
74 |
Duncan - List replies preferred. No HTML msgs. |
75 |
"Every nonfree program has a lord, a master -- |
76 |
and if you use the program, he is your master." Richard Stallman |