[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Directory level security (svnserve)

From: Mark Bohlman <mbohlman_at_tcicredit.com>
Date: 2004-11-18 21:12:54 CET

Erik Huelsmann wrote:
> On Thu, 18 Nov 2004 18:38:20 -0000, Butlin, Jason (UK - Epsom)
> <jbutlin@deloitte.co.uk> wrote:
>
>>O.K. I've looked into getting this script working on a Windows Server,
>>but am having some problems and was wondering if anyone could help.
>>
>>I'm running Windows Server 2K, onto which I've installed ActivePerl from
>>ActiveState. I've set up enough of the script to get it going, but when
>>I attempt to commit something I receive an error about svnlook running
>>with no output. If I attempt to run the script from the command line on
>>the server (admittedly with a bogus transaction number), I get the
>>following messages.
>>
>>G:\>G:\SVNSource\Admin\Scripts\commit-access-control.pl
>>"G:/SVNSource/Experiments" "1a"
>>G:/SVNSource/Experiments/commit-access-control.cfg
>>Running G:/svn/bin/svnlook.exe author G:/SVNSource/Experiments -t 1a
>>'-' is not recognized as an internal or external command, operable
>>program or batch file.
>>G:\SVNSource\Admin\Scripts\commit-access-control.pl:
>>`G:/svn/bin/svnlook.exe author G:/SVNSource/Experiments -t 1a' failed
>>with no output.
>>
>>Can anyone provide any ideas to what is going wrong? Just out of
>>interest, I've also tried replacing the -t argument with just t, and I
>>still get the same message.
>
>
> You should provide an executable program as the first thing on your
> command line. commit-access-control.pl is not executable under
> Windows. You need to prepend the full path to your perl.exe file to
> your command line.
>
> On unix any file can be executable, that's why the pre-commit example
> does not show this.
>
> HTH,
>
>
> Erik.
>
>
>>
>>
>>Thanks
>>Jay
>>
>>-----Original Message-----
>>From: Butlin, Jason (UK - Epsom)
>>Sent: 18 November 2004 16:34
>>To: Eric Gillespie
>>Cc: users@subversion.tigris.org
>>Subject: RE: Re: Directory level security (svnserve)
>>
>>Sorry for my naff Outlook reply!!!
>>
>>I think what I'm after is the sort of security mod-authz-svn offers.
>>Having had a quick look, the pre-commit example probably would do what
>>I'm after - just have to convert it to Windows!
>>
>>Thanks
>>Jay
>>
>>-----Original Message-----
>>From: epg@gould.diplodocus.org [mailto:epg@gould.diplodocus.org] On
>>Behalf Of Eric Gillespie
>>Sent: 18 November 2004 15:55
>>Cc: users@subversion.tigris.org
>>Subject: Re: Directory level security (svnserve)
>>
>>"Butlin, Jason \(UK - Epsom\)" <jbutlin@deloitte.co.uk> writes:
>>
>>
>>>Are there any plans to provide directory level security for a
>>
>>repository
>>
>>>access via svnserve (in the way that Apache already does)?
>>
>>What is "directory level security"? You can use the same
>>mechanism to write-protect any area of your repository as in CVS,
>>using the pre-commit hook. There is even an example of such a
>>hook; i think it is in the contrib directory. Read access is
>>blanket for an entire repository unless you use a solution
>>specific to a single ra layer, such as mod-authz-svn.

Erik,

    Actually you CAN make Perl scripts executable at the command prompt
by including ".PL" in the variable PATHEXT, as in.COM;.EXE;.BAT;.CMD;.JS;.PL

This also requires that Perl can be found in the environment.
Doing this allows you to run the program by doing
C:\> myperl
rather than something like
C:\> perl myperl.pl

One caveat that I never spent the time to work around, is that
Subversion does not seem to honor (or carry over) the PATHEXT variable,
and so this is not set when it comes time to run any hooks. So doing
the same program invocation without the extension or full path to Perl
within the hook script or getting Subversion to call the hook, is still
problematic. In other words on a Windows system with PATHEXT set I was
not able to get start-commit.pl to run without the .bat wrapper.

-- Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 18 21:14:52 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.