How to change udev to mount USB read-only
Where might I look in RHEL 6.7 docs to write a rule in udev to have USB disks mount read-only? I've never customized udev before.
I see we can now have read-only devices mount via udev rules as of RHEL 6.7, as seen in the release notes.
This might be great if I can customize a rule for a certain USB disk UUID.
In RHEL 6.7 Release Notes:
Chapter 11. Storage
udev rules support additional mount points and allowed mount options
Additional mount points and a list of allowed mount options can now be specified with udev rules. The system administrator can write a custom rule to enforce or limit mount options for a specific set of devices. For example, USB drives can be limited to be always mounted as read-only.
Thanks for any information.
Responses
Hi,
This new feature is described in the RHEL Security Guide: Enforcing Read-Only Mounting of Removable Media. There's also a short article here: How to enforce read-only mount of removable media in Red Hat Enterprise Linux?
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
