horstSun Feb 20 16:08:47 PST 2005
I am confused: 1) you talk about processes and setuid (and limitations(?) for scripts) 2) you talk about the filesystem and chown and chmod. You should be able to chmod using scripts and/or cron jobs if you are the owner of the files or root. You need to be root for arbitrary chown, but root can do this per script or cron jobs. Most 'nix dialects understand: chown -R user:group /path/and/so/on ((i.e. do both in one step)) Q: Does your CVS really require: "chmod -R o+w /var/cvs/repository " that is having files world writable? - Horst In reply to: > Date: Fri, 18 Feb 2005 14:24:39 -0800 > From: Jim Beard <beard at counterclaim.com> > Reply-To: Eugene Unix and Gnu/Linux User Group <euglug at euglug.org> > To: Eugene Unix and Gnu/Linux User Group <euglug at euglug.org> > Subject: [Eug-lug] setuid programs > > Howdy Folks, > > So we have been having some funky permission problems involving > commits and lock files with our CVS installation. To solve these issues I > was planning on executing a script from CVSROOT/loginfo to clean up the > repository permissions. Originally I wrote a shell script to do this then > made it setuid. However I now realize that linux generally ignores setuid on > shell scripts for security reasons. Sooo... I wrote a simple C executable > using execl and execlp, however neither of them seem to work. > > The C code looks like this: > > #include <unistd.h> > > int main () { > execl("/bin/chown", "-R server /var/cvs/repository"); > execl("/bin/chgrp", "-R", "server", "/var/cvs/repository"); > execl("/bin/chmod", "-R o+w /var/cvs/repository"); > } > > Anyone know why this isn't working? Anyone have a better solution to my > problem? > > > Jim Beard > counterclaim.com, Inc > http://www.counterclaim.com > http://openefm.sourceforge.net > (800) 264-8145 > > _______________________________________________ > EUGLUG mailing list > euglug at euglug.org > http://www.euglug.org/mailman/listinfo/euglug >