I added following line to run shell script in my php file
$output = shell_exec('./script.sh');
and my script.sh looks like
echo etherX|sudo -S chmod 777 upload/*
echo "Inside -- "
when i execute script.sh by terminal it works but not working by php-script in browser.