Originally Posted by edgarosy
Question for you all...
let's say I have 38 servers. all of my servers hostnames start with abcapp1 abcapp2 ... etc. What is the easiest way to change permissions to 777 on all servers /opt directory at the same time? instead of just login in to each server individually and typing chmod 777 /opt ?
Thanks for your feedback.
Depends. If you have your SSH keys swapped between your local machine and your servers, you can just write a simple bash loop to go through until you hit 38, and run a command. Like "ssh username@abcappXX "chmod 777 /opt"". If you use telnet, write an expect script to do it.
However, doing a chmod 777 on /opt is a BAD idea.