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

subversion changes file permissions on commit

From: Attila Nagy <bra_at_fsn.hu>
Date: Tue, 15 Oct 2013 08:09:53 +0200

Hi,

I store OS images in svn, so I need to record file permissions and
ownership. For this, I use properties.
But svn changes real file permissions:
# ls -l fstab
-rw-r--r-- 1 root wheel 230 Oct 22 2011 fstab
# svn pg file:permissions fstab
mode=33188 user=(0) group=(0)
# chmod 600 fstab
# svn ps file:permissions 'mode=33152 user=(0) group=(0)' fstab
property 'file:permissions' set on 'fstab'
# ls -l fstab
-rw------- 1 root wheel 230 Oct 22 2011 fstab
# svn commit -m test fstab
Sending fstab

Committed revision 29956.
# ls -l fstab
-rw-r--r-- 1 root wheel 230 Oct 22 2011 fstab

Why svn works like this and what can I do to disable/work around this
feature?

BTW, this is the trace where the chmod happens:
  56718 svn CALL unlink(0x804c93ba0)
  56718 svn NAMI "/tmp/svn-e21669fe.tmp"
  56718 svn RET unlink 0
  56718 svn CALL fstat(0x7,0x7fffffffcce0)
  56718 svn STRU struct stat {dev=795533270, ino=6620,
mode=-rw------- , nlink=1, uid=0, gid=0, rdev=4294967295,
atime=1319311412.576898307, stime=1319311412.576898307,
ctime=1381814933.936353362, birthtime=1319311412.576898307, size=230,
blksize=4096, blocks=2, flags=0x0 }
  56718 svn RET fstat 0
  56718 svn CALL close(0x7)
  56718 svn RET close 0
  56718 svn CALL
chmod(0x804c927c8,0x1a4<S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH>)
  56718 svn NAMI "/data/bootsrv/conf/test/etc/fstab"
  56718 svn RET chmod 0

# svn --version
svn, version 1.8.3 (r1516576)
# apr-1-config --version
1.4.8

ps: please keep me on CC.
Received on 2013-10-15 08:10:42 CEST

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.