0

I have taken over a project that has an AWS ec2 elasticbeanstalk instance running a socket.io server.

I have logged in via and done the following steps.

  1. SSH in
  2. cd /var directory.
  3. ls > account app cache db elasticbeanstalk empty games kerberos lib local lock log mail nis opt preserve run spool tmp www yp
  4. I can't see to find the socket server code? Nor the logs for the socket server?

I am not sure where they would be located.

jdog
  • 10,351
  • 29
  • 90
  • 165
  • Possible duplicate of [Where does elastic beanstalk t2 server store my node.js app files?](https://stackoverflow.com/questions/28245224/where-does-elastic-beanstalk-t2-server-store-my-node-js-app-files) – kichik May 09 '19 at 00:21
  • Followed this link and there is no /application folder. – jdog May 09 '19 at 02:51

1 Answers1

0

There are myriad methods to get code on to a server and to run it. Without any information about the code or the OS or anything else, assuming its a Linux based OS, if I’m looking for something and know what it is, I can usually find it by searching for a string that I know I will find inside at least one of the files on the server.

In this case, since its a socket.io, I’d search for socket.io:

grep -rnw '/' -e 'socket.io'

The result will show me all files, including the full path, that contain “socket.io”, and you should be able to determine where the code is pretty quickly.

hephalump
  • 5,860
  • 1
  • 22
  • 23
  • That shows me where the socket.io is, but not my server.js file. I found one in the current directory, but if I edit the server.js file in the current directory and then reboot the server the server.js file in the current directory is back to the orig. – jdog May 09 '19 at 02:53