3 ms·
no one bothered to set proper file permissions That's why shared hosting accounts are so bad. The Unix security model isn't designed for hosting a bunch of unr
by ajasmin 15y ago
no one bothered to set proper file permissions
That's why shared hosting accounts are so bad. The Unix security model isn't designed for hosting a bunch of unrelated websites on the same box. Why should I even be allowed to make a file world readable or run the w command on a web host on which the users don't even know each other?
People should really be using VPS now that they are so cheap.
Edit: After reading the answer to this comment it seems my fear of shared hosting may not be justified. Obviously good sysadmins know how to properly secure these systems.
Still it seems that when Unix was designed it was expected that people would chat with the talk command, see who was online with the who command, and intentionally make files readable by other. With web hosting you really don't want that. You shouldn't even be able to see what other accounts there are on the machine. I was probably wrong to say that shared hosting accounts are "bad" but it doesn't seem like a perfect fit either.
- mike-cardwell 15y agoI built a shared hosting platform on Linux once. The "home" directories for each user were owned by the Apache user, and readable by the user the site ran as. IIRC, something like this: drwxr-x--- and "www-data:mike" The htdocs directory inside was writeable only by the "mike" user in this case. Of course, all cgi/php ran as the user account, rather than as the Apache user. So even if the user screwed up the permissions and created globally read/write files, there was no way that any other user could access them.
- soult 15y agoThe Unix security model is designed for mutli-user hosts. Shared hosting works very well under Unix, iff the admins know what they are doing. Why do you think that before virtualization got popular people were using shell accounts, chroots and BSD Jails for their webhosting/IRC/... needs? Why do you think we have CGI, SuExec, ...? I won't deny that VPS are great, but a properly set up shell server will allow you to do many of the same things a VPS can do.
- zokier 15y ago> The Unix security model is designed for mutli-user hosts. Reminds me of the story of RMS complaing about evil admins that were restricting root level access. The views on computer users and security were quite different in the early days of UNIX. edit: link http://news.ycombinator.com/item?id=2518881 http://news.ycombinator.com/item?id=2518881
- gaius 15y agoRMS' views might have been different. In a little thing we call actual reality the sysadmin is an employee hired by the same people who bought the system (no small investment in those days) to maintain it, and I don't think any reasonable person has ever denied that.
- zokier 15y agoThe shared hosting I'm using has restricted access for users above certain UID to other peoples home directories, regardless of the permission bits.