Let's say I've logged into an image that was spun up by an automated process and it's serving up a website (in my case it's a Rails site). I'm rooted, but don't know where to find the source code. Given that there are processes running that are serving the code, or at least a compiled version of it, is there a reliable way to figure out where on the instance the source code lives?
Asked
Active
Viewed 579 times
2 Answers
0
Note a file the web server use and find it.
In exemple;
find / -name "index.html"
It happened to me in the past as I'am more windows than linux. (I created a cloud linux VM to make a webserver to learn and I didnt knew where the home folder was to the webserver service)

yagmoth555
- 16,758
- 4
- 29
- 50
0
You can use ss -tp
to list all open ports with their process ids. Use ps aux | grep PID
to display the command executed.

Henrik Pingel
- 9,380
- 2
- 28
- 39