On Fri, Oct 18, 2002, Ira Abramov wrote about "Re: hdd partitioning": > Quoting Sagi Bashari, from the post of Fri, 18 Oct: > > I used to move it to /home/www until now. Is it better to keep > > everything in /var? this data is mostly static, so I wonder why RedHat > > decided to move it to there. > > /home is a place for home directories of users, I don't stick websites > in there because I consider that to be data of the webserver. however > it's not a standard library that should go into /usr/lib or /usr/share > because it's stuff I created. /var/www is a good compromise, and it's
/home/www (or /home/httpd, as Redhat used to have) is a good place. The only downside is that to most users (beginners, at least) it seems to imply that there actually exists a user called "www", with /home/www its home directory. This is clearly not the case. Why is /var/www preferred over /usr/lib/www, /usr/share/www, /usr/www, and so on? It's a matter of taste and philosophy. In the recent years, Linux distributions are leaning more and more toward standardizing the filesystem heirarchy in a way described by the FHS - the Filesystem Hierarchy Standard (see www.pathname.com/fhs). http://www.pathname.com/fhs/2.2/fhs-5.1.html describes the purpose of "/var". Quoting that page: "/var is specified here in order to make it possible to mount /usr read-only. Everything that once went into /usr that is written to during system operation (as opposed to installation and software maintenance) must be in /var." The www directory would not normally live comfortably in a read-only directory: users are used to editing files in there casually, and CGI scripts are used to writing their outputs in the same directory as the script. Hence the www directory cannot (if you subscribe to the FHS) be in /usr. If you do want the www directory to be in /usr and you still want to comply with the FHS, you can, but you should make sure the following happens: 1. CGI scripts write their outputs in a separate directory, in /var. 2. The files in the www directory cannot be edited except during brief periods where the amdministrator gains write access to /usr (if it's a local disk, a remount is easy, but if it's an NFS-mounted read-only disk, there might be a only a single central authority who could make that change). Or you can forget about the FHS altogether, and just put the www directory anywhere you want. -- Nadav Har'El | Friday, Oct 18 2002, 12 Heshvan 5763 [EMAIL PROTECTED] |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |A fine is a tax for doing wrong. A tax is http://nadav.harel.org.il |a fine for doing well. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]