Cannot open SCSI device /dev/sg... - Permission denied

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This article is a part of the Troubleshooting collection.

Problem

The amandabackup user doesn't have write permissions to the generic scsi devices.


Solution

To rectify this under Suse Enterprise 10, edit /etc/udev/rules.d/50-udev-default.rules (as root) and change line 134 from:

KERNEL=="sg*",			NAME="%k", GROUP="disk", MODE="640"

to:

KERNEL=="sg*",			NAME="%k", GROUP="disk", MODE="660"


Then unload the relevant scsi module(s), reload the udev rules by running: udevcontrol reload_rules, reload the scsi module and check that the scsi devices now have write permissions to group disk.

If your scsi module is the same as that used by your OS hard disk controller, then you'll need to reboot instead of unloading/reloading the module.

Another option is to make udev rules just for your tape library/drives but it's a little bit more work.