How to change removable devices default mount permission on Red Hat Enterprise Linux 5.
Environment
Red Hat Enterprise Linux 5
Issue
- How to change default mount permission of CDROM.
- How to change default mount permission of USB Drive.
- Changing /dev/
permission using chmod will persist upon reboot?
Resolution
Changing /dev/(usb,cdrom,dvd) permissions using chmod will not persist over reboot. because all system device nodes in the dev directory are managed by the udev program and permissions in udev are a bit misleading.
For removable devices (and other security sensitive devices), the OS sets the permissions based on the console security settings.
Console security settings can be modified by editing following file.
/etc/security/console.perms.d/50-default.perm
For example :
To change CDROM(sr0) default mount permission from 0600(rw------) to 0660 (rw-rw----), Modify following entry in 50-default-perms.
From
<console> 0600 <cdrom> 0660 root,disk</code>
To
<console> 0660 <cdrom> 0660 root.disk
Similarly, other removable devices. e.g Floppy,DVD,USB Drive,Camera default mount permissions can be changed by editing above file.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments