I have a site hosted by a commercial webhosting service. As such, I don't
have any real control over the webserver (in this case, Apache).
What are the most basic, essential elements of security in this case? My
impression is that there are two steps:
(1) binaries and scripts should be executable by the webserver, but not
visible (readable) to the outside world;
(2) when writing binaries and scripts, make sure that to constrain what
actions are taken, and never assume that user data is of some expected form.
Is rule #1 always the case, with (for example) Apache? Or do I have to
worry about the permissions on the directories?
For what it's worth, I started playing with php, and the system doesn't
allow php scripts to be placed in cgi-bin.
(I'm asking these simple, naive questions because most info out there about
Apache, etc are written for administrators who have control over the Apache
installation, which I don't have.)
have any real control over the webserver (in this case, Apache).
What are the most basic, essential elements of security in this case? My
impression is that there are two steps:
(1) binaries and scripts should be executable by the webserver, but not
visible (readable) to the outside world;
(2) when writing binaries and scripts, make sure that to constrain what
actions are taken, and never assume that user data is of some expected form.
Is rule #1 always the case, with (for example) Apache? Or do I have to
worry about the permissions on the directories?
For what it's worth, I started playing with php, and the system doesn't
allow php scripts to be placed in cgi-bin.
(I'm asking these simple, naive questions because most info out there about
Apache, etc are written for administrators who have control over the Apache
installation, which I don't have.)
Comment