NFS Network File System. NFS (Network File System) Network file systems allow us to share files between users on different systems, often with different.

Slides:



Advertisements
Similar presentations
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Advertisements

A Guide to Unix Using Linux Fourth Edition
Installation. Installation   There are three phases to building an LTSP server: – –Installing the LTSP utilities – –Installing the LTSP client packages.
1 實驗十:以 Linux 架設 Internet/Intranet 伺服 器 教師: 助教:. 2 Outline  Background  Linux system  Popular Internet services  Internet services  Internet  HTTP.
Guide To UNIX Using Linux Third Edition
Linux Security Configuration TCP Wrappers. At the machine level Check Request Server.
Linux Networking CIS Why Linux/Unix? Configurability ▫Customizable System to satisfy unique needs. Scalability ▫Able to serve an increasing number.
Network File Sharing Chapter 18. Chapter Goals Understand concepts of network file sharing Understand NFS server setup Understand NFS client setup Understand.
NETWORK FILE SYSTEM (NFS) By Ameeta.Jakate. NFS NFS was introduced in 1985 as a means of providing transparent access to remote file systems. NFS Architecture.
NFS – Network File System WeeSan Lee
Network File System Joe Paulowskey Joe Paulowskey Susan Mulholland Joe Woulfe.
Network File System CIS 238. NFS (Network File System) The most commercially successful and widely available remote file system protocol Designed and.
Joshua Caltagirone-Holzli
NFS Admin And Security Steve Nuchia Sravani Motati Ashish Katyarmal.
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
Remote Disk Access with NFS
UNIT - III. Installing Samba Windows uses Sever Message Block(SMB) to communicate with each other using sharing services like file and printer. Samba.
NFS Server Setup NFS SERVER SETUP. Network File Service NFS Server Setup Allows to share Directories between UNIX Systems Daemons: netfs, nfs, nfslock.
Chapter 31 File Transfer & Remote File Access (NFS)
Configuring Disk Quotas Linux System Administration To implement disk quotas, use the following steps: Enable quotas per file system by modifying /etc/fstab.
SUSE Linux Enterprise Server Administration (Course 3037)
Guide To UNIX Using Linux Fourth Edition
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
A Guide to Unix Using Linux Fourth Edition
1 Network File Sharing. 2 Module - Network File Sharing ♦ Overview This module focuses on configuring Network File System (NFS) for servers and clients.
1 COP 4343 Unix System Administration Unit 15: file server – ftp – nfs.
Linux Security Anthony Albrecht – Services & Accounts
System Administration NFS & Web Servers. NFS SERVER.
VsFTP in Linux. Introduction to FTP The File Transfer Protocol (FTP) is used as one of the most common means of copying files between servers over the.
SAMBA Integrating Linux and Window. What is Samba? Free suite of programs that enables flavors of UNIX to work with other operating systems such as OS/2.
New SA Training Topic 8: File System Access  Our organization uses a variety of services for accessing files on remote systems  WWW  FTP  CIFS/SMB.
ITI-481: Unix Administration Meeting 3. Today’s Agenda Hands-on exercises with booting and software installation. Account Management Basic Network Configuration.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
Distributed File Systems Objectives –to understand Unix network file sharing Contents –Installing NFS –How To Get NFS Started –The /etc/exports File –Activating.
Day 11 SAMBA NFS Logs Managing Users. SAMBA Implements the ability for a Linux machine to communicate with and act like a Windows file server. –Implements.
Department of Computer Science Southern Illinois University Edwardsville Spring, 2008 Dr. Hiroshi Fujinoki FTP Protocol Programming.
Chapter Two Exploring the UNIX File System and File Security.
CIT 470: Advanced Network and System Administration
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 10.4 File System Mounting A file system must be mounted before it can be accessed.
Sys Admin Course NFS and SAMBA Fourie Joubert. Sys Admin Course NFS NFS is the Network File System It allows Linux systems to share a file system, or.
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
Chapter Two Exploring the UNIX File System and File Security.
Cracking Techniques Onno W. Purbo
1 Linux Networking and Security Chapter 5. 2 Configuring File Sharing Services Configure an FTP server for anonymous or regular users Set up NFS file.
Network File System Campus-Booster ID : **XXXXX Copyright © SUPINFO. All rights reserved NFS.
Distributed File Systems Objectives –to understand Unix network file sharing Contents –Installing NFS –How To Get NFS Started –The /etc/exports File –Activating.
Configuring a LAN FTP Client Chapter 17 & 19. Setting up the physical layer Chapter 17 covers the basics of hubs, switches, routers and WAPs.
1 LINUX SECURITY. 2 Outline Introduction Introduction - UNIX file permission - UNIX file permission - SUID / SGID - SUID / SGID - File attributes - File.
Linux Operations and Administration
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).

Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
Unit – 5 FTP Server. FTP Introduction One of the oldest and most commonly used protocols The original specification for the File Transfer Protocol was.
Network File System Peter DSouza. NFS  Allows machines to mount a disk partition on a remote machine as if it were a local drive  Other systems similar.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
PRESENTED BY ALI NASIR BITF13M040 AMMAR HAIDER BITF13M016 SHOIAB BAJWA BITF13M040 AKHTAR YOUNAS BITF13M019.
CIT 470: Advanced Network and System Administration
Configuring Disk Quotas
Ftp File and Print Server
CIT 470: Advanced Network and System Administration
Automount NFS.
IS3440 Linux Security Unit 4 Securing the Linux Filesystem
Web Programming Essentials:
NFS.
CIT 470: Advanced Network and System Administration
Created By : Asst. Prof. Ashish Shah, J. M
The Network File System
Network File System (NFS)
Configuring Disk Quotas
Presentation transcript:

NFS Network File System

NFS (Network File System) Network file systems allow us to share files between users on different systems, often with different operating systems The Windows® operating systems use CIFS (SMB) network file system as implemented by the Samba package on UNIX systems Developed by Sun Microsystems Uses the RPC (remote procedure call) service Requires portmap Directories shared through the /etc/exports file Directories mounted through the mount command

NFS: Service Profile Type: System-V managed service Package: nfs-utils Daemons: nfsd, lockd, rpciod, rpc.mountd rpc.rquotad, rpc.statd Scripts: nfs, nfslock Ports: assigned by portmap (111) Configuration: /etc/exports

Packaging for Unix/Linux Different packaging approaches Solaris: Pkg* (pkginfo, pkgadd, pkgmake) Linux: rpm / rpmbuild Uses digital signatures Overall objectives and approaches are similar Packages are created

NFS Server Components portmap: maps calls from other machines to the correct RPC service nfs: kernel module translates NFS requests into local file system requests rpc,mountd: file client used to mount and unmount remote file systems

/etc/exports examples /var/ftp/pub *.dit.ie(ro,sync) *.comp.dit.ie(rw,sync) /root/presentations rbradley.dit.ie(rw,sync) /data (sync) Note that whitespace makes a difference [server]([options]) applies the options to that server [server1] ([options]) applies the options to everything apart from the server

/etc/exports Exported with root-squashing turned on, this ensures that requests from the root user on a client machine are denied root access to root- owned files on a server machine Such requests are mapped onto a uid such as Can be prevented with the no_root_squash option, but this is not recommended

/etc/exports examples More examples: /usr/local (ro) (ro) /home (rw) (rw, no_root_squash) Also allow access to sets of computers: /usr/local / (ro) /home / (rw)

Controlling access Most services (anything controlled by inetd and also nfs) support access control with /etc/hosts.allow, /etc/hosts.deny Format of files is: [service name]: [host or network/netmask], [host or network/netmask] … E.g: portmap: , mountd: , All: all

Controlling access Any service using this approach will follow the process: Check in hosts.allow: if the requesting server is in this file, allow the access and finish Now check in hosts.deny, if the requesting server is not in this file, allow the access and finish. Allow access For nfs, to allow/deny access ALL the services need to be included in the file. portmap, lockd, mountd, rquotad, statd

NFS Client Client side NFS implemented as a kernel module /etc/fstab used to specify network mounts. NFS shares are mounted at boot time by /etc/rc.d/init.d/netfs

NFS Client Shares can be mounted manually by root, or automatically at boot time. The default /etc/fstab nfs entries in UML Device mountpoint type options dump fsckorder /dev/ubd/0 / ext2 defaults 1 1 /proc /proc proc defaults /dev/ubd/1 none swap sw /etc/fstab nfs entry Device mountpoint type options dump fsckorder Server1:/var/ftp/pub /mnt/pub nfs defaults 0 0

NFS Mount Options Options include rsize=8192 and wsize=8192 will speed up transfers considerably soft: processes return with an error on a failed I/O attempt hard: will block a process that tries to access an unreachable share. nolock: disables file locking and allows inter operation with older NFS servers nosuid: stops suid enabled programmes executing from the mounted file system. noexec: stops all programmes executing from the mounted file system. ro: Read only file system rw: Read/write access

NFS autofs autofs provides the ability to mount NFS shares on demand and to unmount them when they are idle autofs uses the files /etc/auto.master and /etc/auto.misc for configuration autofs is a kernel service, but must be enabled by configuring autofs to run in the appropriate run levels

NFS Services exportfs –r refreshes the server’s share list after modifying /etc/exports -v displays a list of the shared directories and options on a server -a exports all shares listed in the /etc/exports or a share named as an argument -u unexports the share named as an argument or all shares with no argument and a –a -e host shows the available shares on host

Trouble shooting nfs Unable to see a mounted file system: cat /proc/mounts mount –f Permission denied on mount attempt: Check that the fstab entry and exports have the same access (i.e. ro, rw etc) Check you haven’t attempted to export both a parent and a child i.e. /usr and /usr/local can’t be both exported.

Trouble shooting nfs II RPC: Program not registered On the server, use ps or rpcinfo –p to check that portmapper, nfs and mountd are running On the client, use rpcinfo –p [server] to check that it can see the services If the client gets No Remote programs registered, check hosts.allow and hosts.deny

Trouble shooting nfs III Permissions aren’t right /export/dir hostname(rw,no_root_squash) These statements aren’t the same. White space in the second will mean that everybody apart from hostname will get the privileges in the ().

NFS optimisation Issues: NFS is sensitive to network traffic NFS needs both read and write performance NFS traffic is bursty Detection: /usr/sbin/nfsstat –n -a

NFS optimisation Lower the nice value Switch to a journaling file system Spread NFS exported file systems across multiple disks and disk controllers. Use RAID 0/1 RAID 5 isn’t fast on writes Reduce the number of write intensive mounts Automount is difficult to get away from

FTP File Transfer Protocol

FTP Service Profile System-V managed Service Package: vsftpd Script: vsftpd Ports: 21 (ftp) 20 (ftp-data) Config Files: /etc/vsftpd/vsftpd.conf /etc/vsftpd.ftpusers /etc/pam.d/vsftpd Log File: /var/log/vsftpd.log

FTP (File Transfer Protocol) Linux uses vsftpd, which is no longer managed by inetd by default Can be configured to use xinetd. /etc/vsftpd/vsftpd.conf is the main configuration file Two levels of access: anonymous, by default, users are based in /var/ftp By default, anonymous users can download files, but not upload them

FTP (File Transfer Protocol) ftp taranaki Connected to taranaki.student.comp.dit.ie. 220 taranaki FTP server (SunOS 5.8) ready. Name (taranaki:rbradley): rbradley 331 Password required for rbradley. Password: 230 User rbradley logged in. Remote system type is UNIX. Using binary mode to transfer files.

FTP – User access In /etc/vsftpd/vsftpd.conf Control anonymous user access with anonymous_enable=YES/NO Control anonymous user access with upload anon_upload_enable=YES/NO Existing users on a system log in using their usual username and password By default, users can download any file they can read and upload to any directory to which they have write access

FTP – User access ftp> pwd 257 "/export/home/lecturer/rbradley" is current directory. ftp> cd CWD command successful. ftp> pwd 257 "/export/home/lecturer" is current directory. ftp> lcd.. Local directory now /home/staff ftp>

FTP – controlling user access /etc/vsftpd/vsftpd.conf the main configuration file Two additional files used to control access /etc/vsftpd.ftpusers /etc/vsftpd.user_list

FTP – controlling user access Individual users can be denied access by placing their names in /etc/vsftpd.ftpusers /etc/vsftpd.user_list is examined if userlist_enable=YES is set in /etc/vsftpd.conf The list file can be used either to grant access (userlist_deny=NO) or to deny access (userlist_deny=YES).message file will be displayed to anybody changing to a directory. Can also use hosts.allow and hosts.deny

FTP – Controlling directory access By default, ftp connects to the /usr/ftp/pub directory. Users can be restricted to only their home directory chroot_list_enable=NO/YES chroot_list_file=/usr/local/etc/vsftpd.chroot_list