[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: amanda troubles



On Mon, Jan 03, 2005 at 10:45:48AM -0700, Glenn English wrote:
> Amanda is installed and commands and scripts are working well from the
> command line (I did have to add the sbins to backup's path to run the
> amanda utilities). 
> 
> But when I run a shell script as a cron job as user backup, access to
> the tape drive is denied -- /dev/nst0 is root:tape, permissions are 660,
> and backup is in the tape group.
> 
	First I would check that the 'backup' user is part of the 'tape'
group. If not a permissions setting of 660 owned by root:tape would give
exactly what you describe.

> If I put an "su - backup" in the script and run the job as root, I get
> error message: "amdump must be run as user backup."
> 
	What I usually do is to make use of 'sudo' in order to run
amanda commands as 'backup' for testing and never run them as root.
Using sudo it's as simple as using the '-u username' option and the
<command> exactly as you would normally. 

> Is a command run as a cron job different from the same thing from the
> command line? It looks like there might be a difference having to do
> with real user / effective user.
>

	It's been awhile since I did the actual install of amanda,
although I'll be doing it again soon to move my configuration to a new
server we just purchase to work with our Sony LIB 302/A3 library. In or
configuration the cron job entry is actually under the 'backup' users
crontab so it is run as that user and not root at all. If it helps all
we have in cron for amanda is this:

# crontab -u backup -l
0  15 * * 1-5   /usr/sbin/amcheck -m DailySet1
45  0 * * 2-6   /usr/sbin/amdump DailySet1

> Any suggestions? Know of a FM to read (man didn't help)?
> 
> TIA...
> 

	Regards,
	Jeremy

Attachment: signature.asc
Description: Digital signature


Reply to: