![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Complete Idiot's Guide to Linux
Mounting an NFS VolumeMounting an NFS volume is very similar to mounting a CD-ROM or floppy drive. Typically, the mount command is privileged, and only the superuser, or root, can specify it. The only way a user can mount a file system is if the mount description contains the user option on the /etc/fstab file. The mount Command The mount command grafts a file system in a device or in the network to a directory on your local system. If the directory has files, those files are hidden from view until the mount is removed. The file /etc/fstab contains a list of all the mounts in your computer. If a line of the fstab file contains the user option, then a nonroot user can use the mount command to mount it. It is enough to specify the name of the device or mount or its mount point to access the file system. Consider the following: [root@digital nfs]# more /etc/fstab /dev/hda1 / ext2 defaults 0 1 /proc /proc proc defaults 0 0 /dev/hda5 none swap defaults 0 0 /dev/fd0 /mnt/floppy auto user,defaults,noauto 0 0 digital:/share /net/digital nfs ro / My /etc/fstab file contains mount entries for my root partition (/dev/hda1) and for other things such as my floppy (/dev/fd0). Floppies are mountable by any user (see the user option), and they are mounted in the /mnt/floppy directory. The network mounts begin with the name of the machine, followed by a colon (:) and the path they are exporting, followed by the mount point, its type (nfs), and the ro option (read-only). To mount my floppy, I just need to type this: mount /mnt/floppy or mount /dev/fd0 To mount an NFS volume, its not much different: mount host:/path dir mount ro digital:/share /net/digital If you only plan to mount an NFS volume temporarily, it isnt necessary to add it to your /etc/fstab file. However, volumes that are routinely mounted should be added both for convenience and correctness. The umount Command To remove a mount from a file system, you use the umount command. As an argument provide the mount location: umount mountpath umount /net/digital FTPIn Chapter 9, Communication: Web, FTP, Email, and News, you learned how to use KDE and Netscape to download files from FTP sites. As you can imagine, theres a command line equivalent that you can use to download files, called ftp. FTP is both a service and an end-user tool. First, well take a look at how to use the ftp command, and then, well discuss how to enable users to use ftp to get into your machine. Connecting to an FTP SiteThe ftp command is easy to use. Just specify the name of the host to which you want to connect, like this: ftp hostname [root@digital /etc]# ftp localhost Connected to localhost. 220 digital.bordersoft.com FTP server (Version wu-2.4.2-academ[BETA- 15] (1) Wed J an 7 01:03:55 MST 1998) ready. Name (localhost:alberto): alberto 331 Password required for alberto. Password:******** 230 User alberto logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. total 7931 -rw-r--r-- 1 alberto alberto 7165 Sep 16 20:48 #registrar.cgi# -rw------- 1 alberto alberto 14 Sep 1 13:22 #rm.sh# drwxr-xr-x 24 alberto alberto 2048 Sep 26 15:01 . drwxr-xr-x 10 root root 1024 Sep 25 21:39 .. -rw-rw-r-- 1 alberto alberto 998 Sep 26 15:42 .bash_history After you connect, you are required to log in. If you have an account on the system that you are connecting to, you can use your login and password, and youll be taken to your home directory. If you dont have an account, you can try to log in as the user ftp (or sometimes anonymous) and with a password matching your email address. This is called anonymous FTP. Anonymous FTP is restricted to a specific area of the system.
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |