Re: how to write-protect removable media
- From: Jan Kandziora <jjj@xxxxxx>
- Date: Fri, 10 Dec 2010 01:51:38 +0100
zubi schrieb:
k3b is just a GUI for cdrecord/cdrdao. Both may be installed SUID root on
But when I pop in a blank cd as another user, k3b starts up and indeed
allows me to write to it. It seems to ignore the raw device.
your system and thus, render your user rights scheme useless. They used to
need root rights to enable real-time scheduling to avoid buffer underruns
but on a modern system that is not needed anymore (low priority RT
scheduling is usually available to user processes, too), so you can safely
change both to non-SUID.
Even if they are not SUID root, there is still another set of device nodes
you have to cover: /dev/sg*. These nodes are used when the device for
cdrecord/cdrdao is selected with the Bus,Device,LUN device selection
scheme. Unfortunately, all the "SCSI" devices are enumerated here so your
udev rules have to sort out the CDROM through the device attributes. See
# udevadm info --query=name --name=/dev/sg0 --attribute-walk
E.g. ATTRS{type}=="0" are fixed disks, ATTRS{type}=="5" are CDROMS.
Likewise USB automaticallyThe permissions on a mounted filesystem usually are noted inside that
mount it on /media/VENDORNAME and that user can still write to it.
filesystem itself. So if the USB stick has a filesystem where a user zubi
(uid=1000) is given all rights to manipulate the / of that filesystem, the
user jan (uid=1000) on another system the stick is plugged in will gain
those rights on it.
The only exception are filesystems which do not support permissions: FAT and
ISO9660 *without* Rock Ridge extensions. For the former, there is a mount
option where you can set the user, group and permission bits for *all*
files on the filesystem. Those are faked permissions as they cannot be
changed for an individual file.
But there is another mount option common to *all* filesystems: "ro",
readonly. You have to change the automounter's configuration (which one do
you use?) to add that mount option to all automounted filesystems.
Kind regards
Jan
.
- Follow-Ups:
- Re: how to write-protect removable media
- From: zubi
- Re: how to write-protect removable media
- References:
- how to write-protect removable media
- From: zubi
- how to write-protect removable media
- Prev by Date: how to write-protect removable media
- Next by Date: Speed
- Previous by thread: how to write-protect removable media
- Next by thread: Re: how to write-protect removable media
- Index(es):
Relevant Pages
|