PDA

View Full Version : Best practice Mount Options


domino
20th August 2005, 03:14
My next linux build, I want to make a Linux system harder against SUID based and other exploits. I want to keep the following mount points on their own partition. I alocated 10gig to the whole installation. Based on the Fedora 3 installation avaiable on this site, what would you recommend for each partition size. Please keep in mind that I want to keep the absolute minimum so that the majority of my space is alocated to the /var partition.

Avaiable space: 10gig

/ =
/usr =
/home =
/opt =
/var =
/tmp =
/boot =

If you think I need to add aditional partitions, please state that as well.

domino
20th August 2005, 10:41
I did some blind calculations and this is what I came up with. Are these sufficiant enought for a strictly webserver style installation of Fed. C4?

/ = 200MB
/usr = 2,000MB
/home = 1,000MB
/opt = 512MB
/var = 6,000MB
/tmp = 200MB
/boot = 50MB

If I can resize the other directories so that /var can be as large as possible, please let me know.

EDIT: I had to trim down on some partitions to add a 400mb swap partition.

till
20th August 2005, 11:15
I did some blind calculations and this is what I came up with. Are these sufficiant enought for a strictly webserver style installation of Fed. C4?

/ = 200MB
/usr = 2,000MB
/home = 1,000MB
/opt = 512MB
/var = 6,000MB
/tmp = 200MB
/boot = 50MB

If I can resize the other directories so that /var can be as large as possible, please let me know.

I think that looks resonable. Personally i wont choose so much different partitions, beacause sooner or later one of them will be full while other partitions where nearly empty. But for security reasons it is a good descision.

My hd layout is in most cases:

/boot
swap
/tmp
/
/var

With a big /var partition where i put the ispconfig web root.

domino
20th August 2005, 12:10
Personally i wont choose so much different partitions, beacause sooner or later one of them will be full while other partitions where nearly empty.

That's a reasonable comment. However, I was under the impression that I can resize the partition later down the road if such case happens. I personally haven't tried it though. What's your take on that? Is it easy or hard to resize?

till
20th August 2005, 12:21
That's a reasonable comment. However, I was under the impression that I can resize the partition later down the road if such case happens. I personally haven't tried it though. What's your take on that? Is it easy or hard to resize?

I never tried resizing a partition. The risk was too high for me and i dont want to mess up a system in production stage.

domino
20th August 2005, 12:32
I never tried resizing a partition. The risk was too high for me and i dont want to mess up a system in production stage.
:eek: I wouldn't either. This install here is basically a trial and error thing until I know enough to upgrade the stable install. That's why I installed it on a virtual environment. It's easy enough to go back on an old snapshot. No more reinstalling and waiting for updates on the repos.

I plan to put this server, when stable enough, on production and purchase a 1 or 2mb upstream dedicated DSL connection. My friends and family can just pitch in on the bandwidth cost. Which is cetainly cheaper than if they all got there own shared hosting.

Anyway, wish me luck :D. heh, I'll have a server farm before you know it. Just have to upgrade to dual 64 and 4gig memory. :cool:

falko
20th August 2005, 16:45
However you do it, I'd take care that you have your users' web sites and mailboxes on the same partition, or otherwise you'll have problems with quotas... :rolleyes:
If you use mbox, then put the web sites on the /var partition or make a huge / partition with everything on.

domino
20th August 2005, 17:42
However you do it, I'd take care that you have your users' web sites and mailboxes on the same partition, or otherwise you'll have problems with quotas... :rolleyes:

Yes, the users' website are all in the /var partition.

If you use mbox, then put the web sites on the /var partition or make a huge / partition with everything on.

I haven't changed anything with the default mail location. What ever came default with your how-to is where it is. Now I don't know where the default setup saves the emails. I hope they are in /var as well. :eek:

falko
20th August 2005, 17:58
I haven't changed anything with the default mail location. What ever came default with your how-to is where it is. Now I don't know where the default setup saves the emails. I hope they are in /var as well. :eek:

If you use the mbox format, then they're in /var/spool/mail; if you use Maildir then they're in the Maildir directory in a user's hoemdir (which again is under /var if you have your web sites under /var).

Which POP3/IMAP daemon do you use? Which tutorial did you follow?

domino
20th August 2005, 18:09
If you use the mbox format, then they're in /var/spool/mail; if you use Maildir then they're in the Maildir directory in a user's hoemdir (which again is under /var if you have your web sites under /var).
That is great to hear! I installed "Expert" and chose option "2" on the ISPConfig setup. Then changed the default place to "/var/www"
Which POP3/IMAP daemon do you use? Which tutorial did you follow?
I Used Postfix and I fallowed your Fedora 4 Tutorial. Except I added a few more partitions to try to harden the server.

falko
20th August 2005, 18:21
I Used Postfix and I fallowed your Fedora 4 Tutorial. Except I added a few more partitions to try to harden the server.

Then it's imapd which uses mbox.

domino
20th August 2005, 18:26
:D I don't think I'm going to worry about that unless one of my siblings finally figure out what IMAP is and wants to use it.