我有一个在存储库用户下运行的SVN存储库服务器.我希望在每次提交后操作后运行脚本.我写了一个shell脚本,它在每次提交后从钩子运行.它需要以root身份运行.这就是我在脚本中使用sudo的原因,但它没有用.有没有办法以root身份运行脚本?
sudo su
echo "password"
svn export --force file:///home/repository/trunk/ /home/memarexweb/public_html/devel/
chmod -R 777 /home/memarexweb/public_html/devel/
Run Code Online (Sandbox Code Playgroud)