SVN post-commit user permissions -
i've debian webserver subversion running on it.
i'm trying use post-commit script update staging version of site.
#!/bin/sh /usr/bin/svn update /home/sites/example.com/www >> /var/log/svn/example.log 2>&1
if run command command line logged in user 'derek' works fine
but when runs post-commit following error in log file:
svn: can't open file '/home/sites/example.com/www/.svn/lock': permission denied
ok, realize happening here user calling post-commit script isn't 'derek' hasn't permission.
so question user calling post-commit script.
the svnserve daemon run derek ... thought mean post-commit command called derek seems not.
any ideas how can find out user calling
and secondly best practice method allow access user? don't think adding group because group doesn't have write access .svn directories default.
update:
i've found out user calling post-commit script www-data. how solve problem.
update oct8: sorry, didn't question right first time around. here right answer.
as understand trying access svn via http(s), not need svnserve. svnserve svn's proprietary protocol(ie, svn or svn+ssh). while access svn via http(s) running process webuser. can validate doing 'echo $user > /tmp/svn_post_ci_user' in post commit script. solve problem checkout working copy in /home/sites/example.com/www webuser.
old update: think rather trying find user, can include --username derek svn update command should solve problem.
Comments
Post a Comment