0

So I would like to know if anybody can access my LAMP if I just write some plaintext in the index.html file, so that when somebody accesses my_ip:port they will be greeted to the text in that file.

I know everybody can read what's in that plaintext file, that's not my security concern.

My concern is whether or not somebody can run any scripts to affect my server or do anything because of it.

The reason I'm doing this is because I want an encrypted message to be visible on my lamp server, so that I can do some other stuff from there.

  • 2
    I'd be more concerned about the M and the P parts of your LAMP stack, although Apache had a vulnerability recently, too. – Jeff Schaller Apr 11 at 22:35
0

Putting plain text into the file is no less (or more) secure than putting HTML there. As far as the server is concerned, HTML is plain text: what gets sent over the wire is exactly the <html>...</html> bits written in the file.

There may be other security issues in play for your scenario, but this isn't one of them.

I would, however, encourage adapting your web server configuration so that the file is served as text/plain instead of text/html for technical correctness, though the practical differences are pretty minimal (browsers will probably render it in fixed-width instead of variable).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.