Subscribe

ONTAP Recipes: Work around the lack of FTP support in ONTAP with CIFS/SMB or NFS

ONTAP Recipes: Did you know you can?

 

Work around the lack of FTP support in ONTAP with CIFS/SMB or NFS

 

Clustered ONTAP natively does not support FTP access, which means you can't set up an FTP server in Clustered ONTAP like you could with 7-Mode. That doesn't mean you can't use ONTAP to host data accessed via FTP.

 

ONTAP steps

 1. Create a volume on the storage system to host your FTP-accessed data. If desired, create qtrees in the volume to act as directories for users. Create folders inside the qtree for FTP access, if desired. 

2. Create a way to access the data (either CIFS share or NFS export).

3. Lock down permissions to the volume at a file/folder level.

 

FTP server steps (Windows): 

Whether you're using a Windows server or client, you can turn FTP on or off as a Windows feature in most versions of Windows:

1. Enable FTP (method will vary based on Windows OS - for example: https://technet.microsoft.com/en-us/library/hh831655(v=ws.11).aspx#Step1)

2. Add an FTP site; set the UNC path to the CIFS share as the physical path.

3. Configure FTP as desired (SSL, IP addresses, ports, authentication, security, etc).

4. Click on sites and click on the FTP site. Click "Basic Settings" and click the "Test Settings" button.

 

justin.png


5. If successful, test FTP access, puts, gets, etc. 

 

FTP server steps (CentOS 7):

The following link shows how to configure FTP in CentOS 7.
https://www.unixmen.com/install-configure-ftp-server-centos-7/


For Ubuntu:
https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-on-ubuntu-16-04

 

Additionally, you can find many examples of FTP servers leveraging Docker containers at the Docker hub.

https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=vsftp&starCount=0

1. Install FTP on the Linux VM

2. Install NFS client tools (if not already installed)

3. Mount the NFS export to the client and add it to /etc/fstab to remount on reboots, or use autofs configuration to use homedirs for FTP. Recommended mount options:

   rsize=65536,wsize=65536,bg,hard

4.Configure FTP to use the NFS export as the FTP datastore. For vsftp, add the following lines to the /etc/vsftpd/vsftpd.conf file:

   user_sub_token=$USER

   local_root=/NFSpath/$USER/ftp

5. Configure/secure FTP as desired.

6. Test FTP access, puts, gets, etc.