So I have been trying to add script.js into my /var/www/html/ directory in a UBUNTU EC2 AWS Instance using VS Code Remote SSH extension. The directory has 777 permission yet when I save my file, the server stops responding and I can not connect to it through VS Code, terminal, nor the AWS CloudShell. I also can not access the public DNS to see my website anymore either.
I have the port 22 on 0.0.0.0 and all security groups correctly configured. The status checks all come back 2/2. I also have LAMP stack installed. Any ideas?