Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I have a CIFS share mounted on my Linux machine (Fedora 11). This share contains a Subversion working copy that I work with locally on the remote machine. The remote machine is a Linux box running Samba.

I now want to work with the repository on my machine, so I don't have to login to the remote machine to do checkins and updates. However, svn seems to run into permissions problems when trying to perform file operations on the share.

e.g. (on my machine)

$ svn update
svn: Can't open file '.svn/tempfile.tmp': Permission denied

However, when I try to edit the same file on the command line (e.g. with vi) it works fine, and I seem to have full read/write permissions to that file.

I also tried doing a new checkout on my machine on the share:

$ svn co svn:// project
svn: Can't create directory 'project/.svn': Permission denied

But I can do it manually:

$ mkdir project/.svn

...and it works.

I mount the share like this:

mount.cifs // /mnt/mdev -o "uid=myname,gid=myname,password=mypass

So I am the owner of all the files on the mounted share.

For the time being, I can continue using subversion on the remote system, which continues to work fine. But I'd like to get this working. I appreciate any ideas you may have.



Thanks to JohnnyLambada for the suggestion to use strace. Here is the relevant bit of the strace output for attempting a subversion checkout:

open("test/.svn/entries", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
lstat64("test", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
mkdir("test/.svn", 0777)                = -1 EACCES (Permission denied)
write(2, "svn: Can't create directory 'test"..., 59svn: Can't create directory 'test/.svn': Permission denied

It's still confusing, as I can create the directories (with the same modes) on the commandline.

I did notice, however, that using touch to create a temp file causes an error:

$ touch foo
touch: setting times of `foo': Permission denied

Although it wasn't able to reset the timestamp, it did create the file.

share|improve this question
up vote 1 down vote accepted

I had a similar problem with a CIFS share from my D-Link DNS 323. I tried playing with the various mount.cifs options (manpage) until hitting upon nounix which worked for me.

nounix: Disable the CIFS Unix Extensions for this mount. This can be useful in order to turn off multiple settings at once. This includes POSIX acls, POSIX locks, POSIX paths, symlink support and retrieving uids/gids/mode from the server. This can also be useful to work around a bug in a server that supports Unix Extensions.

So, in my case, my /etc/fstab now looks like this:

//  /nas    cifs    rw,nounix,user=,password=,uid=1000,gid=1000    0   0

My problem wasn't quite the same as yours - I was making a fresh checkout of an svn repository to a new directory:

$ svn co /nas/project
svn: Can't change perms of file '/nas/project/.svn/entries': Permission denied
share|improve this answer

It's hard to know what exactly is going wrong. I would try to run the command under strace to see which system call is going wrong and what the error is. Like this:

strace svn update >/tmp/strace.out 2>&1

You'll end up with a big "/tmp/strace.out" file. Take a look in there for the text "Permission denied". Just above it, you should look for whatever system call caused the error. Edit your question with the few lines of output before the error.

share|improve this answer
Thanks for the suggestion; I updated the original post with the strace output – friedo Nov 6 '09 at 18:00
So what you're saying is you can create test/.svn? Strange. Try running the mkdir test/.svn under strace as well to see if it's makes the exact same system call. – JohnnyLambada Nov 7 '09 at 0:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .