php - shell_exec ( 'svn up /var/www/mydirectory' ) not working -


i cannot shell_exec ( 'svn /var/www/mydirectory' ) work. reason nothing happens. tempted think permission issue, not sure. can execute no problem: shell_exec ( 'svn help' )

this because of file-permission issue. in php configurations, /var/www/* not writable php user. svn /var/www/... tries write directory, while svn help not.

/var/www/ not writable php user security precaution. making writable makes site more vulnerable because if bug found in php scripts, attacker more capable of taking complete control on server. (because able write own php code on server)

if /var/www/mydirectory not contain php code needs execute, should safe chmod -x+w mydirectory/. if mydirectory contains php code need execute, , you've assessed there not more secure way of doing it, use chmod +w mydirectory/.

note, recommend making cron job or using other way of running svn up operation different user, , leaving read-only php process.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -