From owner-freebsd-questions@FreeBSD.ORG Mon Apr 11 13:50:46 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E2FC16A4CE for ; Mon, 11 Apr 2005 13:50:46 +0000 (GMT) Received: from smtp-out3.blueyonder.co.uk (smtp-out3.blueyonder.co.uk [195.188.213.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B7DD43D4C for ; Mon, 11 Apr 2005 13:50:45 +0000 (GMT) (envelope-from tim@tjstephens.com) Received: from yuri.tjstephens.com ([82.41.217.175]) by smtp-out3.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Mon, 11 Apr 2005 14:51:22 +0100 Received: by yuri.tjstephens.com (Postfix, from userid 1002) id D9EAD3B8; Mon, 11 Apr 2005 14:51:17 +0100 (BST) Date: Mon, 11 Apr 2005 14:51:17 +0100 From: Tim Stephens To: freebsd-questions@freebsd.org Message-ID: <20050411135117.GA5816@tjstephens.com> Mail-Followup-To: Tim Stephens , freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-OriginalArrivalTime: 11 Apr 2005 13:51:22.0593 (UTC) FILETIME=[8BC92510:01C53E9D] Subject: set-uid bit: where am I going wrong? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: tim@tjstephens.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 13:50:46 -0000 I'm trying to use a script I wrote to copy files from one directory to another (as part of my backup regime). Unfortunately, because they are in my webserver directory, some of the files don't belong to the user that I run the script as (via cron). I can run the script with sudo, so I know that it's a permission problem. My initial thought is that I can use the set-uid bit and chown the script to root, but this still balks. Here is the relevant output of ls -l. -rwsr-xr-x 1 root admin 283 Nov 23 15:58 buprep.yuri Clearly the file is owned by root, and I kept it as part of my group. I've read the man pages, and believe that when I call the script, it will assume root's permissions. It doesn't, so where am I going wrong? Thanks, Tim -- tim@tjstephens.com