Skip to content

Bind Mount Directories

Justin Wu edited this page Jan 12, 2016 · 2 revisions

Bind-mounts are more robust than symlinks, especially when dealing with directories on removable storage: they use time-tested failsafe mounting techniques. Bind-mounted directories can also provide special permissions to users that differ from the source directory.

For example, let's say that you want to link a folder on the external USB hard drive to vsftpd's /var/ftp/pub folder.

  1. First, create the source folder on the external hard drive:

     sudo mkdir /media/usbdisk/ftp
    
  2. Next, (if necessary), create the destination folder on the system:

     sudo mkdir /var/ftp/pub
    
  3. After that, (if necessary) give the target user permissions over this specific directory. In this example, the target user is ftp, in group ftp. If you don't need to run programs from this folder, use 644. If you do, use 755.

     sudo chown ftp:ftp /media/usbdisk
     sudo chmod 644 /media/usbdisk
    
  4. Finally, add this bind mount entry to the /etc/fstab, so it will be mounted on boot every time.

     /media/usbdisk/ftp           /var/ftp/pub                 none    bind    0 0
    

Home Server

Guides to configuring Debian home servers.

Installation

  • Debian Netinstall - Barebones system with only what you need.
  • Crunchbang - God Save the Crunch. Minimal Desktop Debian, with BunsenLabs and CB++.
  • CentOS - What if Red Hat Linux was free?

Network Configuration

  • Port Forwarding - To remotely access a server on the open internet, you must port forward the services.
  • Static IP - You should set a static IP for a server within the router DHCP subnet.

Remote Access

Services

  • Torrents - Torrent Servers
  • IRC Bouncer - IRC Bouncers are critical to idling on IRC servers and receiving private messages.
    • Quassel - Effective, elegant, and powerful IRC client for multiple platforms, including Android.
    • ZNC - Great for Palaver (iOS).
  • Web Server - Which web server is right for you?

Storage

Misc

Dedicated Server

Guides for configuring and setting up a true CentOS dedicated server/VPS.

Testing

Always thoroughly test your dedicated server before you use it.

  • Memtest - Test the sanity of your memory (especially non-ECC)
  • Hard Drive Test - Test the reliability of your hard drives.
  • Speed Test - Test connection speeds and peering worldwide, as well as read/write speeds.
  • Stress Test - Test the overall performance of the computer.

Networking

  • Hostname - The hostname is related to your server's primary domain.
  • Firewalls - Easy firewalls with FirewallD.

Services

  • Web Server - A production dedicated server has a more complex web server design.
  • Rsync Server - Rsync Servers are a reliable way of transmitting and syncing data across the internet, without resending what was already synced

Account Management

  • Handling Admin Privileges
    • King in the Mountain - Create an emergency root account with a special SSH key put in a safe place.
    • Sudo - Give certain trusted users administrative (root) privileges, which are revokable.
Clone this wiki locally