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

Re: NTFS permissions issue on Linux

From: Stefan Sperling <stsp_at_elego.de>
Date: Sat, 25 Dec 2010 16:52:54 +0100

On Sat, Dec 25, 2010 at 05:26:08PM +0200, Jaan Vajakas wrote:
> Hi,
>
> I am using SVN version 1.6.15 on openSUSE 11.3 (x86).and have the
> following issue.
>
> I have an NTFS partition mounted with the following line in /etc/fstab:
> /dev/disk/by-id/ata-SAMSUNG_HM250HI_S1RUJ9FZ801112-part1 /windows
>
> ntfs-3g gid=users 0 0
>
> When I run the following commands:
>
> cd /windows
> sudo svnadmin create --fs-type bdb repos

Just curios, why are you using --fs-type bdb?
fsfs has been the default for a long time and is a safer option
especially in setups where repositories are served concurrently by
different processes (like svnserve and apache httpd, or multiple
users using file:// access at the same time).

> sudo svn co file:///windows/repos/ aa
> svn up aa
> sudo svn log aa
>
> then the output is as follows:
>
> Checked out revision 0.
> svn: Can't set permissions on 'aa/.svn/tempfile.2.tmp': Operation not
> permitted
> svn: 'aa' is not a working copy
>
> So updating the working copy as a non-root user (with the command "svn
> up aa") fails and also it spoils the working copy so that even svn
> commands run as root ("sudo svn log aa") do not recognize the directory
> as a working copy anymore.
> The command "ls -l" shows that all files and directories under /windows
> have rwxrwxrwx permissions, root as the owner and "users" as the owner
> group. My user is (obviously) not the root but belongs to the users
> group.
>
> So the expected behavior would be that
> a) "svn up aa" (and other svn commands) should not fail, since I have
> rwx permissions,
> b) or if it cannot do better than fail then at least it clean up after
> itself instead of leaving the working copy corrupted.

Yes, Subversion should not corrupt a working copy if it has no
permissions to read it.

However, I cannot reproduce the corrupted working copy problem (on
a non-NTFS filesystem).
Trying to updating a WC owned by root as a normal user fails like this:
  svn: Can't open file 'trunk/.svn/lock': Permission denied
But the working copy isn't corrupted.

Do you see working copy corruption if you run your sequence of commands
on a native Linux filesystem, like ext3?

> A workaround is to add the parameter uid=1000 to the /etc/fstab line:
> that would make me, instead of root, the owner of all the files and
> directories under /windows. However, I want multiple users on my
> machine to have full access to the Windows partition and also to be
> able to use working copies on that partition.

I don't think you can rely on the permission bit fields coming from
the NTFS filesystem because NTFS doesn't have UNIX-permission semantics.
There is a long text at
http://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/
discussing the implementation of permissions in ntfs-3g.
I haven't read all of it but I suppose the answer to your problem could
be found in there. E.g. it talks about setting up some sort of "usermapping"
tables. Sorry I cannot help further with this but I use neither Linux nor NTFS.

So it doesn't look like this was a problem in Subversion.
It's probably an issue with the Linux NTFS implementation.
Have you tried getting help e.g. at opensuse user support forums?

Good luck,
Stefan
Received on 2010-12-25 16:53:40 CET

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.