Gentoo Archives: gentoo-user

From: Holly Bostick <motub@××××××.nl>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] k3b access rights
Date: Tue, 03 Jan 2006 17:37:10
Message-Id: 43BAB4ED.8040607@planet.nl
In Reply to: RE: [gentoo-user] k3b access rights by Michael Kintzios
1 Michael Kintzios schreef:
2 <snip>
3 >> Second, for general use (video viewing, game playing, etc) what you
4 >> most likely want is the "users" (note the "s" at the end) option,
5 >> which allows any user to mount/unmount the drive, as opposed to
6 >> just one:
7 >>
8 >> from man mount:
9 >>
10 >> user Allow an ordinary user to mount the file system. The
11 >> name of the mounting user is written to mtab so that he can unmount
12 >> the file system again. This option implies the options noexec,
13 >> nosuid, and nodev (unless overridden by subsequent options, as in
14 >> the option line user,exec,dev,suid).
15 >>
16 >> users Allow every user to mount and unmount the file system.
17 >> This option implies the options noexec, nosuid, and nodev (unless
18 >> overridden by subsequent options, as in the option line
19 >> users,exec,dev,suid).
20 >
21 >
22 > So if I want a single user at-a-time to be able to mount the DVD
23 > drives I just enter user? From memory I think I had concluded that
24 > adding the uid was necessary for CDROMS and NTFS/VFAT fs partitions,
25 > otherwise it was asking for fs type, or was coming up with "only root
26 > can do that" type of errors. Need to try this again and make some
27 > notes.
28 >
29 > The problems that I have are probably two-fold. The generic one is
30 > that I am not sure I have the correct mount options in /etc/fstab and
31 > that I created the /mnt/cdrw, /mnt/cdrom1 etc. mountpoints with the
32 > correct access rights. What are the default mount options and
33 > /mnt/mountpoints access rights for DVD writer and DVDROM? Ditto for
34 > NTFS?
35
36 Sorry, I don't use NTFS, and I only have one user (me)-- and I don't use
37 /mnt/cdrom or /mnt/cdrw (or /mnt/ anything other than the self-created
38 /mnt/iso for mounting loopback images)-- my DVD is mounted to
39 /media/(cdrecorder) by udev (afaik it's udev that does it).
40
41 I take it you don't use udev? Or are you just under the impression that
42 you have to have /mnt/something (I had this problem for the first bit
43 after I switched)? In general use, /mnt./blah is kinda deprecated.
44
45 However, I do know that enabling writing to NTFS partitions in the
46 kernel is not recommended, unless you meet very specific criteria (as
47 the kernel driver can only overwrite a file of the exact same size to
48 such a partition, making editing pre-existing files pretty much
49 impossible; no idea about creating a new file).
50
51 UID/GID is (kinda) necessary for VFAT partitions, only to deal with the
52 possible ownership issues; if you specify the UID/GID of the expected
53 owner, that UID/GID can/will have write privileges to the partition
54 (automatically if UID, when specified if GID), which is useful for
55 shared partitions across multiple distros or OSes and sometimes for
56 multiple users on the same OS. But you may not need any given partition
57 to have write privileges. If, for example, the partition is only full of
58 music files that only need read privileges to play, which you'll almost
59 always have when mounting a partition. But if you wanted to
60 edit the ID2/3 tags of the music files, you would need write privileges.
61 But how many users on your system are actually likely to be editing such
62 tags-- given that said users could also destroy said files with a
63 Windows virus if the virus targeted MP3s and the user had write
64 privileges to the partition containing them? As the admin, you are
65 responsible for knowing what accesses your users actually need, and
66 balancing that against the dangers of giving them such access.
67
68 It really depends on what your specific setup needs, which we cannot know.
69
70 >
71 > The specific one is that I tried to delete a folder from a
72 > re-writable CD: a)while I was browsing it in konqueror and b)using
73 > k3b, but it couldn't do it. I'll try again when I get home to see if
74 > it behaves as expected after I ensure that it has not been mounted.
75
76 Um, hello, this is not WindowsXP. We do not packet-write (that means
77 treat a CD as if it was a floppy and write to it directly from the file
78 manager). You can (kinda) do this, if your kernel is set up to enable
79 packet-writing, but honestly that functionality is quite unstable and I
80 wouldn't use it even if I did like packet writing (which I do not and
81 never have in the some 6 to 7 years since it was introduced).
82
83 Basically what would need to happen in the real (Linux) world, without
84 packet writing, is that a CD burning program would have to create a temp
85 ISO of the files on the CDRW (which afaik it would have to be) without
86 the folder that you intended to delete, erase the current contents of
87 the CDRW and then rewrite the CDRW with the new ISO (which would
88 essentially delete the folder). But I could be wrong, as I don't use -RW
89 media anymore (and this is one of the reasons why).
90
91 In any case, I'm not completely sure that your expectations are
92 reasonable for the environment. Certainly expecting Konq to delete a
93 folder on a CD is unlikely to happen (because the device must be
94 mounted for Konq to see it, and the device is not going to be mounted
95 read-write under any circumstances; this is why, afaik, the kernel only
96 marks
97 the device as writeable using the ide-cd driver and then CD burning
98 programs use raw device access to access and write to it). I have no
99 idea whether Konq supports packet writing if enabled in the kernel, but
100 I would seriously doubt that it does.
101
102 K3b would likely do the whole "create a temp ISO without the
103 proposed-to-delete folder, erase, and reburn" thing, but it's possible
104 that you don't have K3b properly set up to do this (do you have a
105 location set for the creation of temporary ISO files, for example? Is
106 there enough space there for the temp file?). As I said, this is not
107 something I do, not using -RW media, but as far as I can see it's a
108 whole process. What errors precisely are you getting, so we could see
109 where in the process it may be failing?
110
111 HTH,
112 Holly
113
114 --
115 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: k3b access rights Mick <michaelkintzios@××××××××.uk>