General Ubuntu file server question?

V

Videodrome

Guest
Someone let me have what seems to be an old SOHO type server. I've been thinking that for now, I'll run Ubuntu Server on it with no GUI thinking that having something like this to poke around with will force me to keep my CLI skills fresh and I could do other things like Cron jobs or run network monitoring on it.

This old beast has 3 IDE Hard Drive. 1 is 15 GB and 2 others are both 40 GB. I figured I'd put the / file system on the 15 GB and use the other big ones for storage. I think I set it up weird though during the installation. I actually added them as Mountpoints called /hd1 and /hd2. They did mount this way, but the permissions for accessing them are weird. I might have to be Root, but I don't want all the files I add here to be owned by the root user.

I think what I need to do is somehow remove these from /etc/fstab and use a more normal way to mount them. Preferably auto-mount on boot if I can do that. I think I'm on track, but thought I'd post this here for a second opinion or any tips.
 


Depending on what you are doing and how you plan to setup the filesystems there are plenty of options. Software raid with mdadm, logical volume management with LVM, simply change the file permissions with chmod and the owning group with chown...how do you plan to use the hard disks? What file structure do you want?
 
I figured the smaller 15 GB drive would hold the operating system plus Swap and the two 40 GB would just be for storage. Right now I'm leaning toward mounting or linking the big drives to folders under my /home/user directory.

I was kind of hoping I could find a nice Web GUI interface I could use on the LAN with it. Maybe to access media files. I'm not sure how well this old PC would push out video, but I think it could handle music.

Otherwise, general central storage of files would be nice. I might also install MediaWiki or something similar.
 
hmm. If I were in your position, I would setup the server as an FTP server. Use an FTP user account, the users group, with ftp web access. Or maybe Plex or Mediatomb
 
hmm. If I were in your position, I would setup the server as an FTP server. Use an FTP user account, the users group, with ftp web access. Or maybe Plex or Mediatomb

It might wind up going that way FTPing in. I would probably just use FileZilla since it supports the SSH protocol.

I tried setting up PLEX, but I thought the interface was weird and it seemed like I would have to re-tag my files for it to work right.

MediaTomb was very close, but when I clicked on a music file it downloaded it. I was hoping it would just play the mp3 in the browser. I might reconsider MediaTomb and see if I can tweak it and maybe have a Web Browser for my files is still convenient enough to use it.
 
It might wind up going that way FTPing in. I would probably just use FileZilla since it supports the SSH protocol.

I tried setting up PLEX, but I thought the interface was weird and it seemed like I would have to re-tag my files for it to work right.

MediaTomb was very close, but when I clicked on a music file it downloaded it. I was hoping it would just play the mp3 in the browser. I might reconsider MediaTomb and see if I can tweak it and maybe have a Web Browser for my files is still convenient enough to use it.
This seems interesting:
http://www.subsonic.org
 
I looked at SubSonic, but I wasn't sure if that was a free trial thing.
 
So far, rolling with Ubuntu 12.04. Did a regular install on the small drive.

Used the command blkid to get the labels of the hard drives. I followed some tips and added them to /etc/fstab.

# / was on /dev/sda1 during installation
UUID=8ec5c755-35ca-4ff4-9023-353cc0c421cd / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=c7cd2afa-5131-4777-8e7d-4aeb139c0423 none swap sw 0 0

#Mount drive 1
UUID=0198817c-7e20-4b60-b96c-b2e31b0efee3 /home/me/hd1 ext4 defaults 0 2
#Mount drive 2
UUID=52462784-31b0-454f-8f1f-d68230688a39 /home/me/hd2 ext4 defaults 0 2

I like this as a start have the big drives mounted as folders under my /home/user space, it's now persistent, and permissions are set. Could be a useful extra box I can SSH to or even connect with FileZilla.
 
Okay now I'm really getting somewhere. I followed this tutorial on how to add a public_html.

http://www.unixmen.com/how-to-enable-userdir/

This let's me have a /home/user/public_html folder that can be accessed from any web browser on my home LAN by typing 192.168.1.X/~user. For some reason the tutorial makes this folder owned by Root, so I used chown and chgrp to make it owned by the user.

To test this, I found a free mp3 song and used wget to download it on my server. I then went to 192.168.1.X/~user and the the contents present much like a ftp file tree. I click on the mp3 and it played in the browser with no problem.

I also tried this with a movie trailer in mp4 format. It technically works, but has pauses either from latency or because this PC is to old.

This is not as polished as something like PLEX, but it is very simple to use. I plan to revise my Fstab file so that my big hard drive mount under the public_html folder which could then be accessed through any web browser on the LAN.

I might redo this from scratch in a VM just to make sure I have the steps down and make a tutorial. I think this is a nice home file server solution.

EDIT: Had a strange 403 Forbidden error after changing the Fstab file and rebooting. I could play a file through my browser if I typed a full path, but could no longer just see my file index. The solution was to crate a .htaccess file and then #echo 'Options +Indexes' >> /home/user/public_html/.htaccess
 
Last edited:

Members online


Latest posts

Top