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

Re: Respecting inherited Windows file permissions on file create

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Sat, 28 Sep 2013 23:29:30 +0400

On 28 September 2013 23:19, Jason Kresowaty <jason_at_binarycoder.net> wrote:
>> From: Ivan Zhakov <ivan_at_visualsvn.com>
>> Date: Sat, September 28, 2013 2:46 pm
>> I see two possible solutions for this problem:
>> 1. Use hTemplate argument in CreateFile call when temporary file is created
>> 2. Created temporary file along original file to be replaced instead
>> of .svn/tmp in working copy root
>>
>> Option (1) is hard to because APR abstraction, while (2) should be
>> easier but solve only problem when file itself doesn't have specific
>> permissions.
>
> I think you are describing solutions to a different (harder) problem
> than I raised. You are trying to solve the case where the "disrespected"
> permissions were ones that were applied directly to the file that was
> later replaced by svn. My case was permissions implied by inheritance.
> I think that takes a different solution. I say that yours is harder,
> because the problem I described is solvable by adding a single call to
> SetNamedSecurityInfo with parameters whose values are easy to determine
> (i.e., mostly NULLs).
As far I remember Subversion doesn't reset permissions on Windows. The
problem that temporary file created in wc\.svn\tmp and inheriting all
permissions from this directory. Then it moved to wc\a\a.txt and keep
the SD when it was created. Solution (2) is create temporary file in
wc\a folder. In this case it will get proper inherited permissions
from wc\a folder. You may try this solution in your test by modified
permissions of wc\.svn\tmp directory.

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com
Received on 2013-09-28 21:30:21 CEST

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