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

Re: why does Subversion change file permission

From: Mark Reibert <svn_at_reibert.com>
Date: 2007-12-07 08:14:23 CET

On Thu, 2007-12-06 at 21:18 +0100, Vincent Lefevre wrote:
> On 2007-12-06 13:19:29 +0100, Erik Huelsmann wrote:
> > On 12/6/07, Vincent Lefevre <vincent+svn@vinc17.org> wrote:
> > > Note that setting the umask is not always possible as several files
> > > may have different permissions.
> >
> > Subversion doesn't change permissions. It replaces the file which was there.
>
> OK, but I suppose that there are several ways to replace a file.
> For instance, if one does "echo foo > bar" in a shell while bar was
> already existing, then the permissions of bar are not changed.

That is because open(2) does not remove the file before writing to it,
hence it is the same inode with the same perms. If a new file (inode) is
created, the umask comes into play.

-- 
----------------------
Mark S. Reibert, Ph.D.
svn@reibert.com
----------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 7 08:14:48 2007

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.