Depending on your environment and client needs, some protocols will work better than others. Learn how to choose which protocol makes sense for you.
- [Instructor] When we hear file sharing, many different things can come to mind. Functionally, file sharing means allowing access to a file from somewhere else. Files are shared between users and processes on a computer, but that's usually handled by the operating system. The next thing we might think of as file sharing involves BitTorrent and the Copyright Police, and that's not the kind I'll be talking about here. There are many different protocols to provide file sharing services between computers, and they're each appropriate for different sorts of uses and audiences.
The first one we'll look, called FTP, is mostly appropriate for a situation where you need to distribute files to many people you don't know or don't trust. Or, where you need to have those same internet strangers drop off a file for you. Think of distributing gigabytes of scientific data to thousands of researchers worldwide, or a job applicant uploading their 500 megabyte video production reel. It's not practical to create a user account for these people. And serving up that much data isn't a great use case for a basic web server. Email can't accommodate an attachment as large as our job applicant would need to send.
This is a case for FTP. Of course, there's an ever-increasing number of solutions to these problems elsewhere on the web. BitTorrent, Google Drive, Box, Dropbox, iCloud, and so on. But FTP was the original general file transfer solution, and it's still in wide use, so we'll take a look at that first. The next protocol we'll work with is CIFS, Common Internet File System, or SMB, Server Message Block provided on Linux through software called Samba, which is well-suited to providing file sharing for known users within a local network.
This is what you'd use to allow employees to access a central file share, as is common in so many businesses. Or to move files between machines on your local network. CIFS or SMB is well-supported across major operating systems. So it's a good platform-neutral choice to set up in a large or small trusted file sharing environment. The last protocol we'll explore is NFS, or Network File System. Unlike CIFS, which is a good choice for clients that disconnect and reconnect often, NFS is more often used as an infrastructural or permanent kind of connection.
The way it handles data transfer makes it a better choice for connecting servers to each other, or to a NAS or SAN, something that won't, or shouldn't, get disconnected frequently. This extra permanence has some benefits and drawbacks, which we'll take a look at later on. And while it's well supported in Linux, other operating systems can have some problems using NFS for everyday kinds of things. Of course, for every protocol we'll discuss here, there are a handful or more of alternative choices. But these three are the basics. The time-tested, widely adopted, not-going-anywhere-soon foundations.
- Configuring an FTP server
- Securing an FTP server
- Managing users and access
- Troubleshooting FTP problems
- Working with Samba and CIFS/SMB
- Adding a group file share
- Connecting to a share on a Windows domain
- Working with NFS
- Mounting an NFS share at boot