LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2009, 12:21 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
Advice on partitions for a FTP server


I have a 70GB drive RAID1'd that I need to install Red Hat on, then configure as an FTP server. You guys have helped me understand how to load the FTP server once I get the server loaded, but what sizes to use to properly partition the server as I load it, I always have a hard time with since I'm new to Linux. Does anyone have any advice?

Looking at other servers, they have a
/
/boot
/opt
/usr
/var
/tmp
/home
/data
swap

But not sure what's best with only 70GB for an FTP only server.
 
Old 11-11-2009, 12:51 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
You won't need to break it down into that many partitions for something like that. At a minimum I would suggest putting whatever directory you are exposing over FTP to be on it's own partition, the rest could go onto
1 or 2 primary partitions, plus swap.

What exactly is the role of this FTP server? Is it going to be a download-only anonymous like a software mirror, or will there be individual user accounts/directories and uploads?
 
Old 11-11-2009, 12:55 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
The FTP server will be used for a few clients to send and grab files from with their own specific accounts. They can all dump into the ftp root since nothing is highly sensitive, or create a subfolder if they want.
 
Old 11-13-2009, 01:22 PM   #4
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
MS3FGX, does my reply to your last question change anything?
 
Old 11-13-2009, 04:59 PM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Well, if there are going to be multiple users, presumably you are going to be serving files out of /home, so you would want to put that on it's own partition.

If you were doing a big anonymous FTP server like a distribution mirror or something, you could potentially change the default FTP directory to something like /mnt/ftp and mount a second partition on that.
 
Old 11-13-2009, 05:41 PM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
This is my first FTP server, so I'm not really sure where vsftpd makes the root at, or if it can (or should be for security sake) changed.
 
Old 11-13-2009, 05:44 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,383

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
I think your file system permissions protect your folders. Not sure a partition scheme would protect it anymore.

Partitions tend to force space requirements.

Could be wrong.
 
Old 11-13-2009, 05:46 PM   #8
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Thanks. I didn't think so, but wasn't sure.

So how would you guys break up 70GB if you were doing this? would be great to see a few examples, even if its for larger total space, i can always scale down. I know 70GB isn't much these days.
 
Old 11-13-2009, 06:42 PM   #9
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
Originally Posted by rjo98 View Post
This is my first FTP server, so I'm not really sure where vsftpd makes the root at, or if it can (or should be for security sake) changed.
By default, it going to be the home directory of whatever user connects, so /home/username. So putting /home on it's own partition would separate all the user's FTP directories from the OS.

But for example on my server the OS is stored on an 8 GB CF card, and all remote-accessible files are held on a 1 TB HDD. I want to keep local user accounts on CF and only the publicly accessible data on the HDD, so in my case I don't want to put all of /home on the HDD. So I only allow the user "ftp", and have the FTP root set as /mnt/pub_ftp (where the 1 TB drive is mounted).

There are a lot of ways you could set the server up, and it is hard to argue for any one "right" way. In your case, I would probably just do three partitions. One for the root filesystem (/), one for /home (where the FTP accounts will be), and the third for a small swap space.
 
Old 11-13-2009, 06:58 PM   #10
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
ok, thanks. I'll give it a shot!
 
Old 11-13-2009, 07:21 PM   #11
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 872

Rep: Reputation: 112Reputation: 112
Keep in mind once you have your ftp server up and running every time you add a user the user has the ability to view all all system files normally read only. If you don't want that then use chroot to set their home directory for example /home/username
 
Old 11-16-2009, 11:56 AM   #12
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Thanks JMC, i will remember that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New user can't see partitions in FTP drfish AIX 1 10-02-2009 11:14 AM
browsing ntfs partitions via ftp yus Linux - Networking 5 09-14-2005 10:28 AM
Advice on encrypting FTP simonmccourt Linux - Security 5 03-23-2004 02:44 AM
Some Quick FTP Advice gauge73 Linux - Networking 2 04-22-2003 01:17 PM
setting up accounts and partitions for FTP dkc_ace Linux - Software 7 01-10-2003 11:33 AM


All times are GMT -5. The time now is 10:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration