flip79
November 3rd, 2008, 08:31 PM
Hello and sorry for my english, but I'm Italian... ):P
I have a couple of... academic doubts about the management of my web server (it's a CentOS server, but anyway our Ubuntu desktops are from the same happy family :KS):
- I have this CentOS server in a webfarm, pre-partitioned with its big /home and the rest of the system (/) in a little partition of about 4Gb. Well, let's start from the presupposition that I don't want to re-partition the machine... this morning I discovered that the root partition was near to be full: it's normal, because I didn't think that I have to put the files of the sites I'm hosting in /home partition. So, I moved "www" directory from /var to /home/flip79/ (my home directory), and I updated the Apache configuration file, so now it looks for the files of the sites there. It works, but... Is it formally right that they're in my home folder? Is it "more" right if I put them in the "apache" folder of "apache" user (that doesn't currently exists on my server because (I thing) it's not enabled to SSH login)?
- Sites' files have "various" permissions and owners, depending from their born (I directly created some of them as root user, and so they're owned by root as user and as group, some others was uploaded as user "flip79", some others are owned by "apache" user....). In effect, sometimes I have some permission problem and I've to change them with chown apache filename and chgrp apache filename... sometimes I've to CHMODD'em with 775. I don't understand which is the "right" action: which is the right owner? apache/apache? And what about permissions? Which is the right permission pattern for the files that must be written by web user, for example for upload directories?
Thanks in advance for the responses!!!
I have a couple of... academic doubts about the management of my web server (it's a CentOS server, but anyway our Ubuntu desktops are from the same happy family :KS):
- I have this CentOS server in a webfarm, pre-partitioned with its big /home and the rest of the system (/) in a little partition of about 4Gb. Well, let's start from the presupposition that I don't want to re-partition the machine... this morning I discovered that the root partition was near to be full: it's normal, because I didn't think that I have to put the files of the sites I'm hosting in /home partition. So, I moved "www" directory from /var to /home/flip79/ (my home directory), and I updated the Apache configuration file, so now it looks for the files of the sites there. It works, but... Is it formally right that they're in my home folder? Is it "more" right if I put them in the "apache" folder of "apache" user (that doesn't currently exists on my server because (I thing) it's not enabled to SSH login)?
- Sites' files have "various" permissions and owners, depending from their born (I directly created some of them as root user, and so they're owned by root as user and as group, some others was uploaded as user "flip79", some others are owned by "apache" user....). In effect, sometimes I have some permission problem and I've to change them with chown apache filename and chgrp apache filename... sometimes I've to CHMODD'em with 775. I don't understand which is the "right" action: which is the right owner? apache/apache? And what about permissions? Which is the right permission pattern for the files that must be written by web user, for example for upload directories?
Thanks in advance for the responses!!!