Bind Mount Directories
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.
-
First, create the source folder on the external hard drive:
sudo mkdir /media/usbdisk/ftp
-
Next, (if necessary), create the destination folder on the system:
sudo mkdir /var/ftp/pub
-
After that, (if necessary) give the target user permissions over this specific directory. In this example, the target user is
ftp
, in groupftp
. If you don't need to run programs from this folder, use644
. If you do, use755
.sudo chown ftp:ftp /media/usbdisk sudo chmod 644 /media/usbdisk
-
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
- Source: Backdrift - How to use Bind-Mounts in Linux
- Source: Ducea - Allowing FTP Access to files outside the home directory chroot
- Source: G-Loaded.eu - Set up an anonymous FTP server with vsftpd in less than a minute http://www.g-loaded.eu/2008/12/02/set-up-an-anonymous-ftp-server-with-vsftpd-in-less-than-a-minute/)
- Source: Man and Keyboard - Owncloud and an External Hard Drive
Guides to configuring Debian home servers.
- 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?
- 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.
- Torrents - Torrent Servers
- IRC Bouncer - IRC Bouncers are critical to idling on IRC servers and receiving private messages.
- Web Server - Which web server is right for you?
- Partitioning - How to arrange the partitions.
- Bind Mount Directories
- NAS - Build a Network Attached Storage array.
- LTO Tape - The holy grail of archival storage on the cheap.
- Disable Lid Suspend - Don't suspend when the laptop lid is down.
- Disable PC Speaker Beep - It can be annoying if you accidentally press a wrong command and your server at home beeps randomly.
Guides for configuring and setting up a true CentOS dedicated server/VPS.
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.
- Hostname - The hostname is related to your server's primary domain.
- Firewalls - Easy firewalls with FirewallD.
- 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
- 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.
- Passwordless Sudo - If you have SSH keys anyway, why type a second password?.