NAS 109 Using NAS with Linux Access the files on your NAS using Linux A S U S T O R C O L L E G E
COURSE OBJECTIVES Upon completion of this course you should be able to: 1. Use Linux to access files on your NAS via CIFS/SAMBA, FTP, NFS, WebDAV and SSH PREQUISITES Course Prerequisites: None Students are expected to have a working knowledge of: Linux OUTLINE 1. Configuring your NAS 1.1 Enabling CIFS/SAMBA service 1.2 Enabling FTP server 1.3 Enabling NFS service 1.4 Enabling WebDAV service 1.5 Enabling SSH service 2. Configuring Linux 2.1 Connecting via SAMBA 2.2 Connecting via FTP 2.3 Connecting via NFS 2.4 Connecting via WebDAV 2.5 Connecting via SSH A S U S T O R C O L L E G E / 2
1. Configuring your NAS 1.1 Enabling CIFS/SAMBA service Log in to ADM using your Web browser. Select [Services] [Windows]. Select the [Enable Windows file service (CIFS/SAMBA)] checkbox and click [Apply]. 1.2 Enabling FTP server Select [Services] [FTP Server]. Select the [Enable FTP server] checkbox and click [Apply]. A S U S T O R C O L L E G E / 3
1.3 Enabling NFS service Select [Services] [NFS]. Select the [Enable NFS service] checkbox and click [Apply]. Click on the provided link to configure NFS privileges. STEP 2 The Shared Folders section should now be visible. Select a folder (in our example, Public ) and then click on the [Access Rights] button. Then click on the [NFS Privileges] tab. A S U S T O R C O L L E G E / 4
STEP 3 Click the [Add] button in order to add IP addresses that you wish to allow access via NFS. Once you are finished, click [OK]. 1.4 Enabling WebDAV service Select [Services] [WebDAV]. Select the [Enable WebDAV service] or the [Enable secured WebDAV service (SSL)] checkbox and the click [Apply]. A S U S T O R C O L L E G E / 5
1.5 Enabling SSH service Select [Services] [Terminal]. Select the [Enable SSH service] and [Enable SFTP service] checkboxes and click [Apply]. A S U S T O R C O L L E G E / 6
2. Configuring Linux (We will be using Ubuntu 12.04 Desktop as an example) 2.1 Connecting via SAMBA Open the Home Folder and then select [Go] [Location ]. STEP 2 In the [Go To:] field, enter your NAS s SAMBA location (for example: smb://192.168.1.103) and then press [Enter] on your keyboard. A S U S T O R C O L L E G E / 7
STEP 3 This is what the screen will look like once you have successfully connected. We will now click on [Public] as an example. STEP 4 After clicking on [Public] you should be able to see the contents of the folder and that it has been mounted in the left hand panel. A S U S T O R C O L L E G E / 8
2.2 Connecting via FTP Open the Home Folder and then select [Go] [Location ]. STEP 2 In the [Go To:] field, enter your NAS s FTP location (for example: ftp://192.168.1.103) and then press [Enter] on your keyboard. A S U S T O R C O L L E G E / 9
STEP 3 Enter your FTP username and password and then click [Connect]. STEP 4 Another way to connect is by selecting [File] [Connect to Server ]. STEP 5 Fill out the required fields and then click on [Connect]. A S U S T O R C O L L E G E / 10
STEP 6 This is what the screen should look like once you have connected successfully. You should be able to see [FTP as admin on 192.168.1.103 (your NAS s location)] in the upper panel and under [Network] in the left hand panel. 2.3 Connecting via NFS In the Linux command prompt, enter the following command: mount -t nfs <ASUSTOR NAS IP>:/<Network Share Name> <Directory to Mount> For example, if your NAS s IP address is 192.168.1.104, you must mount the Public network drive to Linux s /mnt/pub directory, then enter the following command: mount -t nfs 192.168.1.104:/volume1/Public /mnt/pub Note: You must be logged in using the root account in order to mount a network drive. A S U S T O R C O L L E G E / 11
2.4 Connecting via WebDAV Select [File] [Connect to Server ]. STEP 2 The Connect to Server dialog box will now appear. Fill out the required fields and then click on [Connect]. For the [Type] field make sure you select [WebDAV (HTTP)]. STEP 3 This is what the screen should look like once you have connected successfully. You should see that the [Web] folder has been mounted at positions A and B. Note: If you wish to unmount the folder you can click on the icon. A S U S T O R C O L L E G E / 12
2.5 Connecting via SSH Select [File] [Connect to Server ]. STEP 2 The Connect to Server dialog box will now appear. Fill out the required fields and then click on [Connect]. For the [Type] field make sure you select [SSH]. STEP 3 This is what the screen should look like once you have connected successfully. You will see that the folder has been mounted at positions C and D. A S U S T O R C O L L E G E / 13