Debian Linux: Allow non-root user to write CDs

If you wish to allow non-root users to write CDs, you must give them permissions to do so.

ADVERTISEMENTS

1) Give them permissions by setting SUID-root bit on cdrecord:
# dpkg-reconfigure cdrecord

2) Next you need to add your users to the cdrom group. New user rocky can be added as follows:
# adduser rocky

Once user added, add rocky to group cdrom:
# adduser rocky cdrom

3) Since cdrom group has write access to /dev/cdrom (/dev/hdc etc) and we have added user to cdrom group, rocky will be able to write cds.

4) Create an ISO file and write it:
$ mkisofs -v -o my.iso -R /home/rocky/mydata/
$ cdrecord -v -dev=ATA:1,0,0 speed=4 my.iso

Note as the root user you can mount an ISO file to modify or view its contains.

Related: Burning multi session CDs under Linux

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
1 comment… add one
  • SIFE Apr 30, 2011 @ 22:29

    I think adding rocky user to operator group will be enough, I tested this in FreeBSD.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.