new sa training topic 8: file system access our organization uses a variety of services for...
TRANSCRIPT
![Page 1: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/1.jpg)
New SA TrainingTopic 8: File System Access
Our organization uses a variety of services for accessing files on remote systems
WWW FTP CIFS/SMB (Windows to Windows) NFS (Linux to Linux) Samba (Windows to Linux and Linux to
Windows
![Page 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/2.jpg)
Web
Web administration is determining what files to share and how to manage content.
Our Linux systems use Apache’s httpd
Configuration via httpd.conf (and, optionally, other files)
httpd supports only HTTP
![Page 3: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/3.jpg)
Web (cont.)
Our Windows systems use Microsoft’s IIS
Configuration via MMC IIS supports several internet protocols
HTTP FTP SMTP NNTP (and others)
![Page 4: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/4.jpg)
FTP
Windows FTP runs as a sub-service to IIS Configuration via Internet Service Manager
(MMC to Internet Information Services) Linux
FTP runs more independently Configuration through .conf file (for example,
using vsftp and vsftpd.conf) Avoid anonymous logins unless specifically
needed
![Page 5: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/5.jpg)
File systems
The primary problem is how to give a consistent view of the system across multiple hosts.
Any questions on fundamental filesystem issues? (You should be able to perform CRUD at each of these levels.)
Disks Partitions File systems ACLS File-types Etc.
![Page 6: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/6.jpg)
Windows File System Access
Windows network filesystem access DFS – Combines multiple Windows shares
into a single “root” for easy access Shares – CIFS (SMB) protocol used to
allow access to files on one computer from anotherEnabling sharingCreating a share
GUI – Explorer or via MMCCommand line – net share or
rmtshare
![Page 7: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/7.jpg)
Win. File System Access (cont.)
Viewing available sharesGUI – Explorer or via MMCCommand line – net share or net
view
Connecting to a shareGUI - ExplorerCommand line – net use
![Page 8: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/8.jpg)
Linux File System Access
Network File System - NFS protocol used to allow file sharing
Enabling NFSNfsdrequires rpc.mountd, rpc.nfsd, portmap
Creating a share/etc/exports
/etc/exports lists directories that a server exports to its clients.
Each line in the file specifies a single directory.
![Page 9: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/9.jpg)
Linux File System Access (cont.)
The syntax of the /etc/exports file is: directory [host1]([option][,option]) [host2]([option][,option]) directory [host1]([option][,option]) directory [host3]([option][,option]) [host7]([option][,option])
The directory is the full path name of the directory
Option can designate a simple flag such as ro, rw, sync, or root_squash
The server automatically exports these when the NFS server is started
These exported directories can then be mounted by clients
![Page 10: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/10.jpg)
Linux File System Access (cont.)
/usr/games box1(ro) comp2(ro) 10.0.1.9(ro)
/home box2.external.net(rw,no_root_squash)
/var/tmp
/usr/lib clients *.internal.net(rw)
Entry #1 - /usr/games can be mounted by the systems named box1, comp2, and sys3. (They can read data/run programs, but they can’t write in the directory)
Entry #2 - /home can be mounted by the system box1 and root access is allowed for the directory
Entry #3 - any client can mount /var/tmp (Note: no access list) Entry #4 - specifies an access list designated by the netgroup
named “clients”. Machines designated as belonging to “clients” can mount the /usr/lib directory from this server; also any host from internal.net can access with read and write permissions
![Page 11: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/11.jpg)
Linux File System Access (cont.)
Considering the exportation of a parent directory in a tree that includes one or more child directories.
If you mount the parent directory, would you expect to see the child directories?
In some implementations, you will see the child directories, but with no data beneath them.
In others, including RH9, you will see the child directories and data
Use the hide and no_hide options if you want to set the entire sub-tree as hidden or visible
![Page 12: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/12.jpg)
Linux File System Access (cont.)
/usr/sbin/exportfs -a Exportfs can also be used to add/remove
shares “on the fly” Viewing available shares
Showmount –e Diagnostics on messages set via NFS
nfsstat Connecting to a share
Establish local mount point and mount sharemount -t nfs server:/share /mnt/mymntpoint
Use fstabMounts during system boot
![Page 13: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/13.jpg)
Linux File System Access (cont.)
What about users?Users are dealt with by assuming that
UIDs and GIDs are the same on both the server and the client
Do you want root on clientbox to be root on serverbox? Do you want user1 on client box to be user1 on serverbox?root_squashno_root_squashall_squash
![Page 14: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/14.jpg)
Samba
SAMBA Based on SMB (Server Message Block, also
known as CIFS) Server and Client
Server allows sharing of file system and/or printers with any system that supports SMB (including both Windows and Linux)
Client allows for connections to any SMB server Can act as a Windows Domain Controller Supports network “browsing”
![Page 15: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/15.jpg)
Samba
Our organization uses Samba because of its ability to share files across platforms. It can provide other services as well.
5 Basic Servicesfile sharing (this is our primary concern)network printingauthentication and authorizationname resolutionservice announcement (i.e., Windows browsing).
![Page 16: 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](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e905503460f94b955a0/html5/thumbnails/16.jpg)
Samba (cont.)
Samba includes two core services smbd nmbd (for NetBIOS name resolution)
smb.conf smbstatus