File Sharing Protocols ======================== These protocols are used to Sharing files across networks, offering different levels of security, reliability, and platform support. .. toctree:: :maxdepth: 1 :hidden: :includehidden: NFS SMB WebDAV AFP .. list-table:: :widths: 15 65 20 :header-rows: 1 * - Protocol - Description - Use Case * - NFS (Network File System) - Allows shared access to files over a network, mainly in Unix/Linux systems. *Mounts remote file systems as if they were local.* - Centralized file storage and sharing within a network. * - SMB (Server Message Block) - A network file sharing protocol primarily used in Windows environments. *Provides file/printer sharing, network browsing, and inter-process communication.* - Shared file access between Windows and mixed‑OS networks. * - WebDAV (Web Distributed Authoring and Versioning) - An extension of HTTP that allows clients to perform remote web content authoring. *Maps HTTP resources into file‑system–like semantics.* - Collaborative editing over the web, mounting remote web servers as drives. * - AFP (Apple Filing Protocol) - A network protocol developed by Apple for file services on macOS. *Integrates resource‑fork and Finder metadata support.* - File sharing among macOS systems in home or enterprise networks. .. tab-set:: .. tab-item:: NFS **RFC:** RFC 1094 (v2), RFC 1813 (v3), RFC 7530 (v4) **Main Features:** - Distributed file system protocol for sharing directories/files over LAN - Allows remote mounting of file systems as if they were local - Stateless (v2/v3) or stateful (v4) client-server architecture - Supports file locking, permissions, and access control **Use Cases:** - Centralized file storage across Unix/Linux systems - Home directory sharing in enterprise and academic environments - High-performance computing clusters with shared data **Alternative Protocols:** - SMB/CIFS – Windows-based file sharing - WebDAV – HTTP-based file system access - FTP/SFTP – For simpler file-based transfers .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: Learn More About NFS **Let us learn more about NFS:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`NFS Version&RFC Details ` * :ref:`NFS Basic Setup on Ubuntu using IPv4 ` * :ref:`NFS Basic Setup on Ubuntu using IPv6 ` * :ref:`NFS Protocol Packet Details ` * :ref:`NFS Usecases ` * :ref:`NFS Basic Features ` * :ref:`NFS Feature : File Sharing ` * :ref:`NFS Feature : Transparency ` * :ref:`NFS Feature : Stateless Protocol (v2&v3) ` * :ref:`NFS Feature : Stateful Protocol(v4) ` * :ref:`NFS Feature : Platform Independence ` * :ref:`NFS Feature : Mounting ` * :ref:`NFS Feature : Security ` * :ref:`NFS Feature : File Locking ` * :ref:`NFS Feature : Caching ` * :ref:`NFS Feature : Asynchronous Writes ` * :ref:`Reference links ` .. button-link:: ./NFS.html :color: primary :shadow: :expand: Jump to "NFS" .. tab-set:: .. tab-item:: SMB **RFC / Specification:** Originally CIFS (Common Internet File System); documentation in MS‑CIFS; later SMB2/SMB3 in Windows and published as CIFS/SMB specs (e.g., MS‑SMB2, MS‑SMB3). **Main Features:** - Works over TCP/IP (port 445); can operate over NetBIOS/SMB port 139. - Provides file and printer sharing, authentication, session management. - Supports strong authentication (NTLM, Kerberos), encryption (SMB3), file locking, opportunistic locking (oplocks). - Stateful client‑server architecture with directory enumeration, change notifications. **Use Cases:** - Network file and printer sharing in Windows-centric environments. - Mixed‑platform file access (Windows, macOS, some Linux clients via Samba). - Domain‑based access control in Active Directory environments. **Alternative Protocols:** - NFS – Unix/Linux network sharing. - WebDAV – HTTP/S‑based authoring and sharing. - FTP/SFTP – Basic file transfers. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: Learn More About SMB **Let us learn more about SMB:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`SMB Version&IEEE Details ` * :ref:`SMB Basic Setup on Ubuntu using IPv4 ` * :ref:`SMB Basic Setup on Ubuntu using IPv6 ` * :ref:`SMB Protocol Packet Details ` * :ref:`SMB Usecases ` * :ref:`SMB Basic Features ` * :ref:`Reference links ` .. button-link:: ./SMB.html :color: primary :shadow: :expand: Jump to "SMB" .. tab-set:: .. tab-item:: WebDAV **RFC / Specification:** RFC 4918 (WebDAV), RFC 2518 earlier work; DeltaV, ACL extensions (e.g., RFC 3744). **Main Features:** - Extends HTTP(S) with methods like PROPFIND, PROPPATCH, LOCK, UNLOCK, MKCOL. - Enables read/write access to web-based directories/files. - Supports properties/metadata, locking, namespace manipulations. - Operates statelessly over HTTP; authentication via Basic, Digest, or stronger (e.g., OAuth). **Use Cases:** - Integrating remote web servers as file systems (e.g., Windows “Map Network Drive”, macOS “Connect to Server”). - Collaborative editing of documents on web servers (CMS, wiki systems). - Cloud storage access via WebDAV interfaces. **Alternative Protocols:** - FTP/SFTP – simpler file transfers (less integrated). - SMB/NFS – LAN file systems. - REST APIs – more granular control but less filesystem-like. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: Learn More About WebDAV **Let us learn more about WebDAV:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`WebDAV Version&IEEE Details ` * :ref:`WebDAV Basic Setup on Ubuntu using IPv4 ` * :ref:`WebDAV Basic Setup on Ubuntu using IPv6 ` * :ref:`WebDAV Protocol Packet Details ` * :ref:`WebDAV Usecases ` * :ref:`WebDAV Basic Features ` * :ref:`Reference links ` .. button-link:: ./WebDAV.html :color: primary :shadow: :expand: Jump to "WebDAV" .. tab-set:: .. tab-item:: AFP **RFC / Specification:** Originally proprietary to Apple; some documentation in Apple’s AFP spec; not an IETF RFC. **Main Features:** - Designed for macOS (classic Mac OS and macOS compatibility). - Preserves resource forks, Finder metadata, file IDs, and metadata such as type/creator codes. - Supports authentication via AFPDH (Diffie‑Hellman) and clearsigned passwords; modern macOS supports SMB primarily but still supports AFP in legacy cases. - Supports file locking, journaling, and directory enumeration. **Use Cases:** - Legacy macOS file sharing and Time Machine backups. - Mac-centric home or enterprise network file services. - Preservation of Mac-specific metadata in shared files. **Alternative Protocols:** - SMB – modern Apple recommends SMB. - NFS – UNIX sharing. - WebDAV – remote editing, HTTP‑based. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: Learn More About AFP **Let us learn more about AFP:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`AFP Version&IEEE Details ` * :ref:`AFP Basic Setup on Ubuntu using IPv4 ` * :ref:`AFP Basic Setup on Ubuntu using IPv6 ` * :ref:`AFP Protocol Packet Details ` * :ref:`AFP Usecases ` * :ref:`AFP Basic Features ` * :ref:`Reference links ` .. button-link:: ./AFP.html :color: primary :shadow: :expand: Jump to "AFP"