You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brad Stiles <br...@bellsouth.net> on 2007/07/25 18:23:04 UTC
SVN CLI and Windows security
I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
The command I used was:
svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
To which svn.exe responded:
svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
Brad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: SVN CLI and Windows security
Posted by Brad Stiles <br...@bellsouth.net>.
> > > Well, it's an error that finds its roots in a call to
> > > apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME.
> > > Looking at that function, it calls apr_filepath_root, which
> > > tries to isolate the root in order to see whether it actually
> > > exists. That scheme breaks down when there are no read/write
> > > permissions.
> > The _TRUENAME flag tells us that we MUST use the canonical path.
> > The *only* way to accomplish this is with read/traverse access
> > through the file path.
So, what are the ramifications of not passing that parameter? Will it "work" for those paths that are secured on the root? Is there another way to access the path without running into this problem, or any of the other problems the use of this parameter was no doubt implemented to avoid?
Like I said, I don't think it's unreasonable to assume that a path is readable from the bottom up. I can think of several scenarios in which one would *not* want to grant access to the entirety of the path, and not all of those scenarios assume that the path is a network share.
> I hope Brad got his answer; I'll move on.
Brad got his answer, and it's perfectly acceptable to him, since he doesn't have the problem anymore. :) He'll leave it up to others to decide if they want to pursue it further.
> Thanks for your time, Bill.
Indeed, thanks for the explanation.
Brad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: SVN CLI and Windows security
Posted by Brad Stiles <br...@bellsouth.net>.
> > > Well, it's an error that finds its roots in a call to
> > > apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME.
> > > Looking at that function, it calls apr_filepath_root, which
> > > tries to isolate the root in order to see whether it actually
> > > exists. That scheme breaks down when there are no read/write
> > > permissions.
> > The _TRUENAME flag tells us that we MUST use the canonical path.
> > The *only* way to accomplish this is with read/traverse access
> > through the file path.
So, what are the ramifications of not passing that parameter? Will it "work" for those paths that are secured on the root? Is there another way to access the path without running into this problem, or any of the other problems the use of this parameter was no doubt implemented to avoid?
Like I said, I don't think it's unreasonable to assume that a path is readable from the bottom up. I can think of several scenarios in which one would *not* want to grant access to the entirety of the path, and not all of those scenarios assume that the path is a network share.
> I hope Brad got his answer; I'll move on.
Brad got his answer, and it's perfectly acceptable to him, since he doesn't have the problem anymore. :) He'll leave it up to others to decide if they want to pursue it further.
> Thanks for your time, Bill.
Indeed, thanks for the explanation.
Brad
Re: SVN CLI and Windows security
Posted by Erik Huelsmann <eh...@gmail.com>.
On 7/29/07, William A. Rowe, Jr. <wr...@rowe-clan.net> wrote:
> Erik Huelsmann wrote:
> > On 7/25/07, Brad Stiles <br...@bellsouth.net> wrote:
> >> I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
> >>
> >> The command I used was:
> >>
> >> svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
> >>
> >> To which svn.exe responded:
> >>
> >> svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
> >>
> >> In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
> >>
> >> Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
> >>
> >> Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
> >>
> >> When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
> >
> > Well, it's an error that finds its roots in a call to
> > apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME. Looking
> > at that function, it calls apr_filepath_root, which tries to isolate
> > the root in order to see whether it actually exists. That scheme
> > breaks down when there are no read/write permissions.
>
> This presumes it's an error at all.
I didn't mean that. I meant to say it's an error *message* that ... (etc)
> The _TRUENAME flag tells us that we
> MUST use the canonical path. The *only* way to accomplish this is with
> read/traverse access through the file path.
>
> The arguements for this approach is that an app (such as a server) often
> needs to deal with the single proper name of a resource. Program Files
> may be Progra~1, it may also be Progra~2, or on netware, ProgramF.
>
> > I have no idea whether the APR project feels this is something worth
> > to be fixed, or even fixeable. I cc'ed their dev@ list, to make them
> > aware if the weren't already.
>
> Of course it won't be fixed, because it is not broken.
That's what I meant by fixeable. At first glance it looks rather
broken (in the Win32 api) that the only way to retrieve the canonical
path is to traverse the entire tree from that path up. But, alas,
that's not up for discussion here.
I hope Brad got his answer; I'll move on.
Thanks for your time, Bill.
bye,
Erik.
Re: SVN CLI and Windows security
Posted by Erik Huelsmann <eh...@gmail.com>.
On 7/29/07, William A. Rowe, Jr. <wr...@rowe-clan.net> wrote:
> Erik Huelsmann wrote:
> > On 7/25/07, Brad Stiles <br...@bellsouth.net> wrote:
> >> I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
> >>
> >> The command I used was:
> >>
> >> svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
> >>
> >> To which svn.exe responded:
> >>
> >> svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
> >>
> >> In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
> >>
> >> Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
> >>
> >> Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
> >>
> >> When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
> >
> > Well, it's an error that finds its roots in a call to
> > apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME. Looking
> > at that function, it calls apr_filepath_root, which tries to isolate
> > the root in order to see whether it actually exists. That scheme
> > breaks down when there are no read/write permissions.
>
> This presumes it's an error at all.
I didn't mean that. I meant to say it's an error *message* that ... (etc)
> The _TRUENAME flag tells us that we
> MUST use the canonical path. The *only* way to accomplish this is with
> read/traverse access through the file path.
>
> The arguements for this approach is that an app (such as a server) often
> needs to deal with the single proper name of a resource. Program Files
> may be Progra~1, it may also be Progra~2, or on netware, ProgramF.
>
> > I have no idea whether the APR project feels this is something worth
> > to be fixed, or even fixeable. I cc'ed their dev@ list, to make them
> > aware if the weren't already.
>
> Of course it won't be fixed, because it is not broken.
That's what I meant by fixeable. At first glance it looks rather
broken (in the Win32 api) that the only way to retrieve the canonical
path is to traverse the entire tree from that path up. But, alas,
that's not up for discussion here.
I hope Brad got his answer; I'll move on.
Thanks for your time, Bill.
bye,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: SVN CLI and Windows security
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Erik Huelsmann wrote:
> On 7/25/07, Brad Stiles <br...@bellsouth.net> wrote:
>> I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
>>
>> The command I used was:
>>
>> svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
>>
>> To which svn.exe responded:
>>
>> svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
>>
>> In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
>>
>> Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
>>
>> Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
>>
>> When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
>
> Well, it's an error that finds its roots in a call to
> apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME. Looking
> at that function, it calls apr_filepath_root, which tries to isolate
> the root in order to see whether it actually exists. That scheme
> breaks down when there are no read/write permissions.
This presumes it's an error at all. The _TRUENAME flag tells us that we
MUST use the canonical path. The *only* way to accomplish this is with
read/traverse access through the file path.
The arguements for this approach is that an app (such as a server) often
needs to deal with the single proper name of a resource. Program Files
may be Progra~1, it may also be Progra~2, or on netware, ProgramF.
> I have no idea whether the APR project feels this is something worth
> to be fixed, or even fixeable. I cc'ed their dev@ list, to make them
> aware if the weren't already.
Of course it won't be fixed, because it is not broken.
Bill
Re: SVN CLI and Windows security
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Erik Huelsmann wrote:
> On 7/25/07, Brad Stiles <br...@bellsouth.net> wrote:
>> I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
>>
>> The command I used was:
>>
>> svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
>>
>> To which svn.exe responded:
>>
>> svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
>>
>> In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
>>
>> Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
>>
>> Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
>>
>> When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
>
> Well, it's an error that finds its roots in a call to
> apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME. Looking
> at that function, it calls apr_filepath_root, which tries to isolate
> the root in order to see whether it actually exists. That scheme
> breaks down when there are no read/write permissions.
This presumes it's an error at all. The _TRUENAME flag tells us that we
MUST use the canonical path. The *only* way to accomplish this is with
read/traverse access through the file path.
The arguements for this approach is that an app (such as a server) often
needs to deal with the single proper name of a resource. Program Files
may be Progra~1, it may also be Progra~2, or on netware, ProgramF.
> I have no idea whether the APR project feels this is something worth
> to be fixed, or even fixeable. I cc'ed their dev@ list, to make them
> aware if the weren't already.
Of course it won't be fixed, because it is not broken.
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: SVN CLI and Windows security
Posted by Erik Huelsmann <eh...@gmail.com>.
On 7/25/07, Brad Stiles <br...@bellsouth.net> wrote:
> I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
>
> The command I used was:
>
> svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
>
> To which svn.exe responded:
>
> svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
>
> In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
>
> Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
>
> Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
>
> When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
Well, it's an error that finds its roots in a call to
apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME. Looking
at that function, it calls apr_filepath_root, which tries to isolate
the root in order to see whether it actually exists. That scheme
breaks down when there are no read/write permissions.
I have no idea whether the APR project feels this is something worth
to be fixed, or even fixeable. I cc'ed their dev@ list, to make them
aware if the weren't already.
Hope that answers your question.
bye,
Erik.
Re: SVN CLI and Windows security
Posted by Erik Huelsmann <eh...@gmail.com>.
On 7/25/07, Brad Stiles <br...@bellsouth.net> wrote:
> I ran into a situation today concerning the command line client and windows security. The problem is that the user (a build user performing automated builds on a Windows 2003 VM) attempted to check out a file to a network share and couldn't, apparently because that user doesn't have access to the share root, even though it does have access to the directory into which the file should be exported.
>
> The command I used was:
>
> svn export http://server/trunk/dir1/dir2/file.txt \\server\share\dir1\dir2\dir3\file.txt --non-interactive --force
>
> To which svn.exe responded:
>
> svn: Error resolving case of '\\server\share\dir1\dir2\dir3\file.txt'
>
> In that tree, the user has no rights to \\server\share\, but has read/write access to dir1 and below. If, as that user, I do 'dir \\server\share', I see nothing, but if I do 'dir \\server\share\dir1', I see everything just fine.
>
> Now, in our case, that shouldn't be a problem much longer because the network guys are in the process of changing the access rights on that directory; the build user really should have access there. However, I don't think it's unreasonable to assume that there might be a legitimate reason for such a restriction.
>
> Is there something we did wrong here (aside from the rights issue) that would have allowed the export to happen despite the access rights? FWIW, 'svn checkout' resulted in the same type of error.
>
> When the network guy saw it, he said, "Maybe they're using the old NT4 method of stepping through the tree, rather than going straight to the location specified." Is there something in whatever layer svn is using for this that accesses the tree step by step rather than as one entity? And is it worth "fixing" if it is a problem?
Well, it's an error that finds its roots in a call to
apr_filepath_merge with an argument of APR_FILEPATH_TRUENAME. Looking
at that function, it calls apr_filepath_root, which tries to isolate
the root in order to see whether it actually exists. That scheme
breaks down when there are no read/write permissions.
I have no idea whether the APR project feels this is something worth
to be fixed, or even fixeable. I cc'ed their dev@ list, to make them
aware if the weren't already.
Hope that answers your question.
bye,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org