Bacula-users

Re: [Bacula-users] Rewind permissions error in SD (UNCLASSIFIED)

2009-06-24 16:21:10
Subject: Re: [Bacula-users] Rewind permissions error in SD (UNCLASSIFIED)
From: Arno Lehmann <al AT its-lehmann DOT de>
To: "Swartzbaugh, Richard A CTR DISA EUR" <richard.swartzbaugh.ctr AT disa DOT mil>
Date: Wed, 24 Jun 2009 22:13:06 +0200
Hi,

24.06.2009 16:57, Swartzbaugh, Richard A CTR DISA EUR wrote:
> Classification:  UNCLASSIFIED 
> Caveats: NONE
> 
> I have installed Bacula on a Solaris 10 system using a StorEdge C2 tape
> jukebox.  When I try to label a tape, I get the following error:  Unable
> to open device "SDLT1-Drive" (/dev/rmt/0mbn): ERR=Permission denied
> 
> Using the mt command (mt -f /dev/rmt/0mbn rewind), I can rewind the tape
> without errors.
> 
> I ran the bacula-sd daemon in debug mode and got the output below.  It
> appears that the rewind of the tape following the open fails due to
> permission problems (even though all 3 daemons are running as root and
> /dev/rmt/0mbn has 666 permissions).  

Hmm... I don't know this from Solaris, but with FreeBSD I recall 
something similar. In that case, a proper devfs.conf worked wonders!
(Even though you would assume that root could access the device anyway...)

Then, of course ACLs might prevent the SD from fully accessing the 
tape device - see getfacl et al.

With Solaris, in addition to the automatic permission assignment at 
device detection, there is also role-based access control, which is 
managed with tools like ppriv, roleadd, usermod with -R option, and 
probably others - this is where my knowledge ends :-)

Finally, Solaris is said to allow access to devices to only one user 
at a time - you can check which devices are in use by which user with 
list_devices. I guess it's possible that this feature might be the 
reason for your problems, too.

No you've got some ideas - have fun with them!

Arno


> Line 441 in dev.c is after a d_ioctl() rewind call that apparently
> fails.
> 
> backups-bge0-sd: dev.c:336-0 Close fd for mode change.
> backups-bge0-sd: dev.c:345-0 open dev: type=2 dev_name="SDLT-Drive"
> (/dev/rmt/0mbn) vol=test118 mode=OPEN_READ_WRITE
> backups-bge0-sd: dev.c:394-0 Open dev: device is tape
> backups-bge0-sd: dev.c:409-0 Try open "SDLT1-Drive (/dev/rmt/0mbn)
> mode=OPEN_READ_WRITE
> backups-bge0-sd: dev.c:431-0 Rewind after open
> backups-bge0-sd: dev.c:441-0 Rewind error on "SDLT1-Drive"
> (/dev/rmt/0mbn) close: ERR=Permission denied
> backups-bge0-sd: dev.c:475-0 dev.c:474 Unable to open device
> "SDLT1-Drive" (/dev/rmt/0mbn): ERR=Permission denied
> backups-bge0-sd: dev.c:483-0 open dev: tape -1 opened
> backups-bge0-sd: dev.c:358-0 preserve=0x0 fd=-1
> backups-bge0-sd: dev.c:1892-0 Clear volhdr vol=
> backups-bge0-sd: vol_mgr.c:562-0 vol_unused: no vol on "SDLT1-Drive"
> (/dev/rmt/0mbn)
> 
> 
> Any ideas?
> 
> Thanks,
> Andy
> 
> Classification:  UNCLASSIFIED 
> Caveats: NONE
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>