Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 9925 invoked from network); 23 Nov 2005 14:29:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Nov 2005 14:29:58 -0000 Received: (qmail 78807 invoked by uid 500); 23 Nov 2005 14:29:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 78727 invoked by uid 500); 23 Nov 2005 14:29:50 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 78704 invoked by uid 99); 23 Nov 2005 14:29:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 06:29:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.6.10.2] (HELO colossus.hpl.hp.com) (192.6.10.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 06:31:21 -0800 Received: from kropotkin.hpl.hp.com (kropotkin.hpl.hp.com [15.144.59.2]) by colossus.hpl.hp.com (8.12.10/8.12.10) with ESMTP id jANESqvH009992 for ; Wed, 23 Nov 2005 14:28:52 GMT Received: from localhost (localhost [127.0.0.1]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id 88F3E4A73 for ; Wed, 23 Nov 2005 14:28:52 +0000 (GMT) Received: from kropotkin.hpl.hp.com ([127.0.0.1]) by localhost (kropotki [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13446-01-11 for ; Wed, 23 Nov 2005 14:28:49 +0000 (GMT) Received: from timmay.hpl.hp.com (timmay-hb.hpl.hp.com [15.144.59.39]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id DE377A2B4 for ; Wed, 23 Nov 2005 14:28:48 +0000 (GMT) Received: from [16.27.193.131] ([16.27.193.131]) by timmay.hpl.hp.com (8.13.2/8.13.2) with ESMTP id jANESdk2002052 for ; Wed, 23 Nov 2005 14:28:40 GMT Message-ID: <43847CBF.6060602@apache.org> Date: Wed, 23 Nov 2005 14:29:19 +0000 From: Steve Loughran User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: Backup before deploy References: <3D902F826461C445877604A22ED463D30E55BB@MSGMMKCLP2WIN.DMN1.FMR.COM> In-Reply-To: <3D902F826461C445877604A22ED463D30E55BB@MSGMMKCLP2WIN.DMN1.FMR.COM> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPLB-IMAP-MailScanner-Information: Please contact the Helpdesk for more information X-HPLB-IMAP-MailScanner: Found to be clean X-HPLB-IMAP-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-Virus-Scanned: amavisd-new at kropotkin.hpl.hp.com X-HPL-MailScanner-Information: Please contact the Helpdesk for more information X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.618, required 5, autolearn=not spam, AWL -0.62) X-MailScanner-From: stevel@apache.org X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bozorgdadeh, Afshin wrote: > My last 2cents > You could get the job done or you could just brain storm about it. > When you are su to a different user you are creating a chilled process, > so your script has to have a way to communicate with a child process. In > the good old day there was a scripting language name "EXPECT" which > could pass the arguments to the chilled process. But I think you problem > is much simpler than that. Let's break it up in two sections. > Second section first. > > 2) tar and gzip files with a to privileged restricted location allowed. > There is a concept of "sticky bit" in UNIX you could create a script > that will run as a privileged user. But anybody could run that scrip. > #!/usr/bin/sh > # script to backup file as BIG DUDE > # scrip name = Backmeup.sh > tar cvf /BackupDirectory/Mydailybakup.tar /sorce/needto/bakup/* > gzip /BackupDirectory/Mydailybakup.tar > > after saving this file you have to make this a sticky bit it > login as the priviladged user and > chmod 4755 Backmeup.sh On my list of things never to do on unix, "suid root scripts" are on there, right up with "never go 'rm -rf /etc'" Its too insecure, dont ask me why, just do the research :) I believe that recent versions of solaris turn of suid root scripts for security reasons. Make it a suid root binary. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org