No, sudo is not being used. I am calling the svn command directly in
the post-commit.
The svn command is owned by root but the setuid flag is not set.
Here's an excerpt from the script:
svn=/usr/local/bin/svn
look=/usr/local/bin/svnlook
grep=/bin/grep
${look} dirs-changed ${REPOS} -r ${REV} | ${grep}
"Navigator/trunk/Develop" > /dev/null
if [ $? = 0 ]; then
${svn} update /mnt/Disc/Develop -q > /dev/null
fi
${look} dirs-changed ${REPOS} -r ${REV} | ${grep}
"Navigator/trunk/Products" > /dev/null
if [ $? = 0 ]; then
${svn} update /mnt/Disc/Products -q > /dev/null
fi
Tommy Nordgren wrote:
> Are your commit hook using the sudo command?
> This will set the owner ow files created to root.
> Also some tool you call might have a owner of root, and have the
> setuid flag set.
>
> On Feb 8, 2006, at 3:15 PM, Bill Williams wrote:
>
>> I realize this is probably more a linux thing than subversion, but
>> I'm baffled.
>>
>> I am running svnserve as a daemon on a linux computer. It is
>> running as user "svn". I accomplished this by making svn the owner
>> of svnserve and then doing a "chmod a+s svnserve" so when its
>> executed, svn is who is doing it.
>>
>> Anyway, I have a post-commit hook which is suppose to update a
>> special workspace whenever someone commits something. This works;
>> however, the files that are updated have "root" as the owner instead
>> of "svn". Since svn is the user executing the process (I verified
>> this with a ps command), I would assume svn would be executing the
>> post-commit hook and therefore, any commands within the hook. I
>> want svn to be the owner of these files. Does anyone have any ideas?
>>
>> Thanks
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: users-help@subversion.tigris.org
>>
>
> -------------------------------------
> This sig is dedicated to the advancement of Nuclear Power
> Tommy Nordgren
> tommy.nordgren@chello.se
>
>
>
Received on Wed Feb 8 16:08:11 2006