Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2005 14:51:17 +0100
From:      Tim Stephens <tim@tjstephens.com>
To:        freebsd-questions@freebsd.org
Subject:   set-uid bit: where am I going wrong?
Message-ID:  <20050411135117.GA5816@tjstephens.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050411135117.GA5816>