laravel 5 - Envoy Task Runner: run command that requires sudo access -


i using https://laravel.com/docs/5.4/envoy deployment tool. in envoy.blade.php, have command requires sudo access example:-

chmod 777 -r storage/ chmod 777 -r bootstrap/cache 

these commands fails error saying operation not permitted. how can resolve this?

to run commands sudo try following:

echo "{{ $password }}" | sudo -s chmod 777 -r storage/ echo "{{ $password }}" | sudo -s chmod 777 -r bootstrap/cache 

obviously you'll need pass sudo password envoy run command.

envoy run mytask --password=mypass 

tested on ubuntu server 16.04 & 17.04


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -