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

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

This article is a part of the Troubleshooting collection.


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


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"


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.

Personal tools