I have Ubuntu machine thats running a Rails app. I want to share the log file with another developer so they can watch what is happening with the app in real time using a command such as this:
tail -f ~/railsapp/log/staging.log
What is the best way to do this without exposing all of my passwords, API keys, etc that are embedded in my Rails app?
I could create a group & user using the command:
groupadd logviewer
adduser lv1 --ingroup logviewer
Then remove permissions for others
chmod -R o-rwx ~/railsapp
Then re-add read permission for others
chmod -R o+rx ~/railsapp/log
Are there consequences to this approach? Is there a better way?
Added 3/5/2014 - Looks like this is also a good idea:
chmod -R o+rx ~/railsapp/public
Added 4/14/2014 - You're also to need to allow the path to the log directory...so:
chmod o+rx ~/railsapp
chmod o+rx ~/railsapp/log