How do i know which program-user access a certain folder in linux debian?, basically a screwed my svn repo, basically cause i could not commit to it due to permission. got a

db/txn-current-lock': Permission denied error.

So i tried to fix it and screwed up again. because of emergency in the programing team, i gave 777 permission to all folder and change the user:group permission to root:root to all. Now i want to fix the setup like god commands. I want to create a a group which only people on these groups are able to use the svn, but i don´t know which user (program) access the repo.

Is it www-data ? or is it _svn:*:73:73:SVN Server:/var/empty:/usr/bin/false (this from /etc/passwwd) ? how do i check ? Thank you!


How do you serve the repo?

Is it through apache mod_svn? Then the directory/files have to be owned by the user under which apache runs (www-data usually).

Through SSH? Then you have to create a group that will own the files (but there were some problems with this setup, don't remember what).

Through svnserve? Then it must be owned by user under which svnserve runs.

  • The problem with SSH was with files occasionally ending up owned by root, despite your settings. They claimed to have fixed it, but that was about the time I switched to git. – Brad Mace Oct 6 '10 at 2:17
  • then default ACLs could be a solution (setfacl -R -m d:g:svn_users:rwx svn-repo), I'd recommend serving it through Apache either way (audit logs, better authentication/authorization, integration with LDAP, no problems with permissions..., access to newest files with any web browser) – Hubert Kario Oct 6 '10 at 2:58
  • How can i tell how do i serve the svn repo? – Ernest Oct 6 '10 at 20:34
  • how do you connect to the repo? is the protocol ssh:// or ssh+svn://? then you're going through SSH. svn://? It means svnserve. http:// or https://? means the apache module -- mod_svn – Hubert Kario Oct 6 '10 at 20:40
  • Please guys, check my train of though. It´s Through svnserve, cause i checkout using svn://. so my next question, how do i know which user svn runs on ? got "_svn:*:73:73:SVN Server:/var/empty:/usr/bin/false" (this from /etc/passwwd) ? so i guess it´s svn ? but su svn wont work, i guess i should chown -R _svn:_svn * ? – Ernest Oct 7 '10 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.