I am using an old Rails application. No one touched him after a year. The last developer left in April 2015, and I have no way to contact him. I have ssh access to the server and I have access to the Github repository.
I do not know any of the usernames / passwords.
If I ssh on the server and I have a cat database.yml file, I see things like:
staging: adapter: mysql2 encoding: utf8 pool: 5 socket: /var/lib/mysql/mysql.sock database: o_wawa_stage username: wawa_stage password: <%= ENV['STAGE_DATABASE_PASSWORD'] %> host: access.dmedia.com
If I run the command "printenv", then I do not see any of these vars. I assume that they are loaded only by the Rails environment.
I suppose I can edit templates to spit out values ββusing empty put statements, but I think there should be a more obvious way to do this, other than printing the data that the public could see. This?
If I try to run the "rails console", I get:
Rails Error: Unable to access log file. Please ensure that /var/www/haha/production/releases/20150118213616/log/development.log exists and is writable (ie, make it writable for user and group: chmod 0664 /var/www/haha/production/releases/20150118213616/log/development.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
I do not have sudo in this field, so I can not fix the error.
source share