Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103094 - Subversion 1.2.1 unable to import (Permission denied error)
Summary: Subversion 1.2.1 unable to import (Permission denied error)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Paul de Vrieze (RETIRED)
Depends on:
Reported: 2005-08-19 17:07 UTC by Nes Yarug
Modified: 2005-08-25 13:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Nes Yarug 2005-08-19 17:07:36 UTC
Fresh install of Subversion 1.2.1. Here is my emerge -pv subversion output:

[ebuild   R   ] dev-util/subversion-1.2.1  +apache2 +bash-completion -berkdb
-emacs -java +nls +nowebdav +perl +python +zlib 0 kB

Created a native filesystem repository like so:

svnadmin create --fs-type fsfs /var/svn

and started svnserve:

/etc/init.d/svnserve start

Then when I try to import (I tried both local on the server and from a remote
client) I get the following error message:

Locally with the Linux client:
$ svn import -m "no message" test/ file:///var/svn/
svn: Can't create directory '/var/svn/db/transactions/0-1.txn': Permission denied

Remotely with tortoisesvn from a Windows client:
Error Can't create directory '/var/svn/db/transactions/0-1.txn': Permission denied

These are the files and their permissions of /var/svn/db:
drwxr-sr-x  5 root root 256 Aug 20 01:34 .
drwxr-xr-x  7 root root 224 Aug 20 01:34 ..
-rw-r--r--  1 root root   6 Aug 20 01:34 current
-r--r--r--  1 root root   2 Aug 20 01:34 format
-rw-r--r--  1 root root   5 Aug 20 01:34 fs-type
drwxr-sr-x  2 root root  72 Aug 20 01:34 revprops
drwxr-sr-x  2 root root  72 Aug 20 01:34 revs
drwxr-sr-x  2 root root  48 Aug 20 01:34 transactions
-rw-r--r--  1 root root  37 Aug 20 01:34 uuid
-rw-r--r--  1 root root   0 Aug 20 01:34 write-lock

I also tried changing ownership of all files in /var/svn to apache:apache (chown
-Rf apache:apache /var/svn), but I get the same error messages...

Reproducible: Always
Steps to Reproduce:
1. emerge subversion 1.2.1
2. create a new repository
3. import some files

Actual Results:  
I recieved the error messages as described above. No files were imported.

Expected Results:  
The files imported into Subversion repository.

emerge info:

Portage (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r9 i686)
System uname: 2.6.12-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
CFLAGS="-march=pentium4 -pipe -Os -fomit-frame-pointer -fno-stack-protector"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -pipe -Os -fomit-frame-pointer -fno-stack-protector"
FEATURES="autoconfig distlocks sandbox sfperms strict"
USE="x86 apache2 apm bash-completion berkdb bitmap-fonts crypt cups eds emboss
encode foomaticdb fortran gdbm gif gpm gstreamer hardened imlib ipv6 jpeg libg++
libwww mad mikmod mmx mpeg mysql ncurses nls ogg opengl oss pam pdflib perl png
python readline sasl sdl spell ssl tcpd truetype truetype-fonts type1-fonts
unicode vhosts vorbis xml2 xv zlib userland_GNU kernel_linux elibc_glibc"
Comment 1 Paul de Vrieze (RETIRED) gentoo-dev 2005-08-25 06:25:34 UTC
Ok your problem is that your repository is created as root or as apache user.
You are however trying to access the repository as a different user. This of
course is not allowed. There are various solutions to this problem. The cleanest
solution is using file and directory ACL's. This should allow you to specify
which groups/users may access the repos, and to ensure that new files get the
correct permissions. Alternatively you could use a wrapper script for svnserve
and/or svn with another umask. A third alternative would be to either use
svnserve or the apache module. Look at the homepage and the svn book for more
information and details. (
Comment 2 Nes Yarug 2005-08-25 13:04:23 UTC
That was it! Thanks. You put me back in the right direction. Had to add the
Subversion users in the apache group. Everything working now.

ps: I am using svn+ssh for authentication.