cannot open SCSI device ‘/dev/pass11’ – Permission denied

Right after getting my SCSI cable problems fixed, I was all set to run some Bacula jobs. They immediately started failing:

27-Nov 12:59 bacula-dir JobId 112458: Start Copying JobId 112458, Job=CopyToTape-Diff.2012-11-27_12.58.05_08
27-Nov 12:59 bacula-dir JobId 112458: Using Device "DTL01"
27-Nov 12:59 kraken-sd JobId 112458: Ready to read from volume "DiffAuto-2357" on device "MegaFile" (/storage/compressed/bacula/volumes).
27-Nov 12:59 kraken-sd JobId 112458: 3301 Issuing autochanger "loaded? drive 0" command.
27-Nov 12:59 kraken-sd JobId 112458: 3991 Bad autochanger "loaded? drive 0" command: ERR=Child exited with code 1.
Results=cannot open SCSI device '/dev/pass11' - Permission denied
0

27-Nov 12:59 kraken-sd JobId 112458: 3301 Issuing autochanger "loaded? drive 0" command.
27-Nov 12:59 kraken-sd JobId 112458: 3991 Bad autochanger "loaded? drive 0" command: ERR=Child exited with code 1.
Results=cannot open SCSI device '/dev/pass11' - Permission denied
0

What does the permission on pass11 look like?

 ls -l /dev/pass11
crw-------  1 root  operator    0, 249 Nov 27 12:49 /dev/pass11

And what does bacula-sd run as?

# ps auwx | grep bacula-sd
bacula   8249  0.0  0.0 26556  2436  ??  SsJ   2:37AM   0:00.05 /usr/local/sbin/bacula-sd -u bacula -g bacula -v -c /usr/local/etc/bacula-sd.conf
bacula   8487  0.0  0.0 27040  3716  ??  Is    2:38AM   2:48.46 /usr/local/sbin/bacula-sd -u bacula -g bacula -v -c /usr/local/etc/bacula-sd.conf
root    30719  0.0  0.0  9124  1160   0  S+    1:05PM   0:00.00 grep bacula-sd
# 

There… bacula/bacula (You can ignore the bacula-sd on the first line; it’s running in a jail, as indicated by the J in the 8th column).

What are bacula’s group names etc?

# id bacula
uid=910(bacula) gid=910(bacula) groups=910(bacula),5(operator)

OK, so /dev/pass11 is not readable/writable by bacula. I know it used to be. I recalled a system ability for altering device permissions at run time. It took a bit of hunting in /etc to located it, but I found /etc/devfs.conf. In it, I found this near the end:

# so bacula can access the autochanger via the operator group
#perm    ch0     0660
perm    pass10  0660
perm    pass11  0660

Don’t you just love comments?

So… why is this not working? As I documented in a previous post, after making changes to devfs.conf, or adding new devices to the system, you need to restart devfs:

[root@kraken /etc]# /etc/rc.d/devfs restart
[root@kraken /etc]# ls -l /dev/pass11
crw-rw----  1 root  operator    0, 249 Nov 27 12:49 /dev/pass11
[root@kraken /etc]# 

See? Now the permissions are adequate for Bacula.

I thought it would be interesting to document these entries from /var/log/messages because I had not noticed the portals notice before:

Nov 27 12:49:26 kraken kernel: sa0: <DEC TZ89     (C) DEC 2561< Removable Sequential Access SCSI-2 device 
Nov 27 12:49:26 kraken kernel: sa0: 10.000MB/s transfers (10.000MHz, offset 15)
Nov 27 12:49:26 kraken kernel: ch0 at ahc0 bus 0 scbus12 target 0 lun 0
Nov 27 12:49:26 kraken kernel: ch0: <DEC TL800    (C) DEC 0326< Removable Changer SCSI-2 device 
Nov 27 12:49:26 kraken kernel: ch0: 10.000MB/s transfers (10.000MHz, offset 15)
Nov 27 12:49:26 kraken kernel: ch0: 10 slots, 1 drive, 1 picker, 0 portals
Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top