Take the tour ×  Goal: update /var/www with latest on svn
commit.  ubuntu server 10.10, latest apache2, latest svn,
location: /var/svn/[projectname]  To do this I created a simple
post-commit script:   #tests if www-data user runs this script
on commit (which it does) touch /tmp/test.log  #works when run
from the command line (sudo ./post-commit) but not when run by
www-data sudo /usr/bin/svn update /var/www  To fix the issue of
the second command not working as www-data I tried...  Editing:
sudo visudo and added (at the end): www-data ALL=(ALL)
NOPASSWD:ALL  Chowning: /var/www to www-data:www-data  Chmoding:
all of /var/www to 777  Still no luck... any ideas?
share|improve this question What error are you getting? cron
should send any stderr output by email. –  Andrew Medico Dec 3
'10 at 1:28 add comment  2 Answers  What if you run this:    su
- www-data -c '/usr/bin/svn update /var/www'  (The sudo is not
needed if /var/www/ is 777 and owned by www-data..)  As the root
user? (then it suid()s as www-data and