3

I have several svn repositories in /projects/svn which should be writeable by 2 users, mine (unix), and wwwrun (apache, for svn over http)

newly created folders and file should be read/writeable by both users

i played around with setfacl but couldn't get it working the way i need it

my attempt was as follows:

unknown:/projects/svn # setfacl -b .
unknown:/projects/svn # setfacl -m u:unix:rwx,u:wwwrun:rwx,m:rwx .
unknown:/projects/svn # setfacl -dm u:unix:rwx,u:wwwrun:rwx,m:rwx .
unknown:/projects/svn # getfacl .
# file: .
# owner: unix
# group: users
user::rwx
user:wwwrun:rwx
user:unix:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:wwwrun:rwx
default:user:unix:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

unknown:/projects/svn # su -s /bin/bash wwwrun
wwwrun@unknown:/projects/svn> md test
wwwrun@unknown:/projects/svn> getfacl test
# file: test
# owner: wwwrun
# group: www
user::rwx
user:wwwrun:rwx                 #effective:r-x
user:unix:rwx                   #effective:r-x
group::r-x
mask::r-x
other::r-x
default:user::rwx
default:user:wwwrun:rwx
default:user:unix:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

wwwrun@unknown:/projects/svn>

as you can see, my user (unix) has only r-x (as effective) permissions

3 Answers 3

5

well, i should've just read the manual...

https://web.archive.org/web/20151220084629/http://turing.suse.de/~agruen/acl/linux-acls/online/
Section 'How ACLs Work'

my group bit was to restrictive (r-w), which restricted the mask to r-x, and subsequently the named users in my ACL could not write

actually, it's rather simple :)

2
  • Link now dead - please add the actual content instead :) Sep 27, 2016 at 10:18
  • waybackmachine has a snapshot of the link. just updated it; only one image is missing
    – fholzer
    Sep 29, 2016 at 11:42
2

I cannot reproduce what you get; I get the expected behaviour whether I include the m:rwx or not. This is on a Linux Ubuntu 10.04 LTS (Lucid Lynx) with kernel 2.6.32-24-generic, the ext4 filesystem and setfacl v. 2.2.49: (Users 'bhm' and 'test')

$ pwd
/data/musikk/dir
$ setfacl -b .
$ setfacl -m u:bhm:rwx,u:test:rwx,m:rwx .
$ setfacl -dm u:bhm:rwx,u:test:rwx,m:rwx .
$ getfacl .
# file: .
# owner: bhm
# group: bhm
user::rwx
user:bhm:rwx
user:test:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:bhm:rwx
default:user:test:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

$ su -s /bin/bash test
Password: 
test@hva:/data/musikk/dir$ mkdir testdir
test@hva:/data/musikk/dir$ getfacl testdir
# file: testdir
# owner: test
# group: test
user::rwx
user:bhm:rwx
user:test:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:bhm:rwx
default:user:test:rwx
default:group::r-x
default:mask::rwx
default:other::r-x
1
  • hm, that's strange, i run openSUSE 11.2, Linux 2.6.34.1-default, setfacl 2.2.48. I tried it again, with different users and different directories. i can't figure out why it doesn't work for me...
    – fholzer
    Sep 5, 2010 at 13:46
0

The problem is with the mask not being set by default for some reason. I can't see why it's happening, but it might be better to not set it. Try missing the m:rwx out and then try.

1
  • now the mask is automatically calculated, which results in a default:mask:rwx and mask:r-x => again, effective permissions: r-x is what i want actually possible access control lists
    – fholzer
    Sep 5, 2010 at 13:30

You must log in to answer this question.

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