From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Liang, Warren" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Backup fails on "permission denied" Date: Wed, 23 Jul 2003 08:17:32 -0700 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1058974015 25340 80.91.224.249 (23 Jul 2003 15:26:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Jul 2003 15:26:55 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Wed Jul 23 17:26:50 2003 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 19fLNf-0005n3-00 for ; Wed, 23 Jul 2003 17:18:16 +0200 Original-Received: (qmail 16242 invoked by uid 5); 23 Jul 2003 15:19:07 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 16142 invoked by uid 49493); 23 Jul 2003 15:19:07 -0000 Original-Received: from Warren.Liang@sms-ito.com by sws1 by uid 49491 with qmail-scanner-1.16 (clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-0.5/5.0):. Processed in 1.160722 secs); 23 Jul 2003 15:19:07 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 23 Jul 2003 15:19:05 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HIH00KTVH7SQP@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 23 Jul 2003 11:19:05 -0400 (EDT) Original-Received: from gate1.smsnet.com (gate1.smsnet.com [198.4.193.130]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HIH00A03H79QH@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 23 Jul 2003 11:18:46 -0400 (EDT) Original-Received: from sbreims0.lax.ais.marconi.com (sbreims0.smsnet.com [198.4.195.12]) by gate1.smsnet.com (8.12.9/8.12.9) with ESMTP id h6NFIjDK011747 for ; Wed, 23 Jul 2003 08:18:45 -0700 Original-Received: by sbreims0.smsnet.com with Internet Mail Service (5.5.2653.19) id <3HC1ZSJD>; Wed, 23 Jul 2003 08:03:06 -0700 Content-return: allowed Original-To: "Majordomo Q&A Tur64 \(E-mail\)" X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:4914 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:4914 Good Morning: Thanks to Dr. Blinn and Peter Wolfe valuable information, the "operator" is able to complete the backup. I grant the setuid permission bit on file /sbin/vdump and changes operator account's group id to match /sbin/vdump. Thanks. Dr. Blinn's response: Generally speaking, the reason backup utilities like "vdump" are able to do a "full" backup when run by the root user is that they inherit the root user's ability to bypass file system access restrictions. Your "oper" account lacks that capability. In Tru64 UNIX (and it has ALWAYS been this way and will not change), a script can be set "setuid root" but that doesn't make the script have root privilege. You could presumably create a small program that would be run setuid that would in turn "exec" the script. That *might* do what you want. Or it might not. Peter Wolfe's response: The files that you can't access are on different groups (e.g. auth, bin) from those that the operator account is a member of. So you either have to: 1)Make sure operator is a member of the group for all the files you need to back up or 2) run backups as root. One solution is to not change the operators groups and instead use Division of Privileges (dop) to authorize the operator account to run vdump as root. The operator would then do: dop vump when using vdump and it would run as root. My original post: > I am using "operator" account to do backup. The account configuration is: > Primary group: oper > Secondary group: backup, dba, operator, and system > > Backup script : > -rwsr-xr-- 1 root backup 270 Jul 21 10:10 mytest > > # cat /usr/bin/mytest > exec > /usr/users/operator/mytest.log 2>&1 > cd /sbin > vdump -0 -u -v -f /dev/nrmt0h / > vdump -0 -u -v -f /dev/rmt0h / > > Execute the script: > # at -m now > /usr/bin/mytest > #... > # cat mytest.log > path : / > dev/fset : /dev/re0a > type : ufs > vdump: Date of last level 0 dump: the start of the epoch > vdump: Dumping directories > vdump(bd): unable to open directory <./etc/auth>; [13] Permission denied > vdump(bd): unable to open directory <./sbin/rc0.d>; [13] Permission denied > vdump(bd): unable to open directory <./sbin/rc2.d>; [13] Permission denied > vdump(bd): unable to open directory <./sbin/rc3.d>; [13] Permission denied > vdump(bd): unable to open directory <./.dt/Desktop>; [13] Permission denied > vdump(bd): unable to open directory <./tcb/files>; [13] Permission denied > vdump(bd): unable to open directory <./tcb/lib>; [13] Permission denied > vdump(bd): unable to open directory <./.netscape-cache>; [13] Permission > denied > vdump(bd): unable to open directory <./.netscape>; [13] Permission denied > vdump(bd): unable to open directory <./nsmail>; [13] Permission denied > vdump: Dumping 94701390 bytes, 107 directories, 1644 files > vdump: Dumping regular files > bd ./ > bd ./etc/ > bd ./etc/nls/ > bd ./etc/nls/loc/ > bf ./etc/nls/loc/C, 2586 > ... > Thanks again and have a nice day, > Warren