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

Re: Help with Apache+Subversion+repositories on a Samba share

From: Célio Cidral Junior <ccidral.newsbox_at_gmail.com>
Date: 2006-01-19 18:08:52 CET

I solved this problem by replacing the gid=nas by uid=ccidral and now
it's working fine. The mount command now looks like this:

mount -t cifs -o
uid=ccidral,username=ccidral,password=my-password-here
//10.1.1.132/DEVELOPMENT$ /mnt/repositories

Of course, uid=ccidral refers to a local user and username=ccidral
refers to a NT Domain user, but it's not mandatory to use the same
name for both.

I wondered why it didn't work with only the gid. Since the user as
which Apache is actually running is in the 'nas' group, it seemed to
me that it should work. But looking inside a transaction directory of
a failed commit, I noticed that only the owner has both read and write
grants to the file, as you can see below. And in that case root was
the owner of everything under that directory.

ccidral@m195601-ubuntu:/repo/nas/xyz/db/transactions/1-2.txn$ ls -l
total 1
-rw-r--r-- 1 root repo 0 2006-01-19 14:55 changes
-rw-r--r-- 1 root repo 4 2006-01-19 14:55 next-ids
-rw-r--r-- 1 root repo 124 2006-01-19 14:55 node.0.0
-rw-r--r-- 1 root repo 0 2006-01-19 14:55 props
-rw-r--r-- 1 root repo 0 2006-01-19 14:55 rev

Setting the uid=ccidral instead of gid caused the filesystem to set
ccidral as the owner, and then my commits started working because
Apache was running with the same user passed as an option to the mount
command.

Cidral

2006/1/17, Célio Cidral Junior <ccidral.newsbox@gmail.com>:
> Hi,
>
> I have googled a lot about this issue but could not find anything that
> could help me. My apologies if this subject was already discussed a
> lot.
>
> I installed and configured Apache and Subversion in a Linux box in
> order to do some tests with repositories in a Samba share. I mounted
> the share and created some repositories, then activated the httpd
> server. But all I can do is to browse the repositories (using a web
> browser) and check outs. When I try to commit something, Subversion
> gives me:
>
> ccidral@m195601-ubuntu:~/ens$ svn status
> A a-text-file
> ccidral@m195601-ubuntu:~/ens$ svn commit -m "My first commit"
> svn: Commit failed (details follow):
> svn: Can't open file
> '/mnt/development/APPS/CRM/TEMP/ens/db/transactions/0-3.txn/props':
> Permission denied
>
> It's likely a problem with read/write permissions on the repository.
> However everything seems to be correct, and I can't figure out what's
> wrong. The transactions are created but it seems that they cannot be
> read. As you can see below, the transactions remain in the repository.
>
> root@m195601-ubuntu:/mnt/development/APPS/CRM/TEMP/ens# svnadmin lstxns .
> 0-1
> 0-2
> 0-3
>
> The storage media is a NAS server. Below is the command I have
> executed to mount the share.
>
> root@m195601-ubuntu:/mnt# mount -t cifs -o
> gid=nas,username=ccidral,password=my-password-here
> //10.1.1.132/DEVELOPMENT$/APPS/CRM/TEMP repositories
>
> There's a group called nas and it's used to mount the share (gid=nas).
> Apache is configured to run as the user ccidral which is in the nas
> group. Below is what's in httpd.conf:
>
> User ccidral
> Group nas
>
> And below are the current permissions on the repository. Note that I'm
> listing the dir as ccidral, so it has proper permissions.
>
> ccidral@m195601-ubuntu:/mnt/development/APPS/CRM/TEMP/ens$ ls -l
> total 1
> drwxrwxrwx 2 root nas 0 2006-01-17 10:46 conf
> drwxrwxrwx 1 root nas 0 2006-01-17 10:46 dav
> drwxrwxrwx 1 root nas 0 2006-01-17 10:46 db
> -r-xr-Sr-t 1 root nas 2 2006-01-17 10:46 format
> drwxrwxrwx 1 root nas 0 2006-01-17 10:46 hooks
> drwxrwxrwx 2 root nas 0 2006-01-17 10:46 locks
> -rwxrwSrwt 1 root nas 229 2006-01-17 10:46 README.txt
>
> Some version info: Subversion 1.3.0 (r17949); Apache 2.0.55; Samba
> 3.0.14a-6ubuntu1.
>
> May somebody shed some light. If you need more information, please let me know.
>
> Thanks,
>
> Celio Cidral Junior
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 19 22:58:19 2006

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.