What is SFTP? SFTP stands for Secure File Transfer Protocol; which is a secured version of the File Transfer Protocol or FTP, which is itself part of the Secure Shell or SSH Protocol. As their names imply, these protocols are used to easily transfer data and access permissions over an SSH data stream. As vulnerabilities […]
SFTP stands for Secure File Transfer Protocol; which is a secured version of the File Transfer Protocol or FTP, which is itself part of the Secure Shell or SSH Protocol. As their names imply, these protocols are used to easily transfer data and access permissions over an SSH data stream.
As vulnerabilities were discovered and access points exploited, SFTP was developed from FTP protocols, ensuring the availability of a secure connection that can be encrypted to transfer files within and between local and remote systems. Files can be transferred using WinSCP and SFTP clients.
FileCloud is a fine-tuned, enterprise-grade file sharing, sync, and storage solution. Admins and users can leverage granular sharing permissions and user/group policies to protect their data and efficiently collaborate on files.
Considering the existing file sharing solutions within FileCloud and the hyper-secure features that are built into the platform, SFTP/SCP protocols are not directly supported by the FileCloud platform.
However, for clients and consumers who wish to use SFTP with FileCloud, the Solution Experts team has prepared instructions on how to access and leverage SFTP resources using a Linux-based FileCloud on-prem server.
Host Name (IP address): The Full Domain Qualified Name or IP address of the SFTP server you are going to connect to.
Username: used to access the SFTP resources
Password: used to access the SFTP resources
The user who is mounting the SFTP resource must have Read/Write permission to the resource.
It is important to verify the details of your software so that you can choose the appropriate installation. Install the relevant SFTP client for your operating system. Windows, Mac, and Linux users can use the following solutions or another of their choice.
Connect to the SFTP server using the client and your collected credentials. The example below is using the WinSCP solution:
Press the “Login” button:
If your login process is successful, switch to the Linux server where FileCloud is installed.
Ensure that the following packages are installed on your server. All operations are performed as root user.
[root@server01 ~]# yum install -y fuse-sshfs sshpass
[root@server02 ~]# apt install -y sshfs sshpass
Create a folder: /NetworkShares
[root@server02 ~]# mkdir /NetworkShares
Then create a folder for the SFTP mount point:
[root@server02 ~]# mkdir /NetworkShares/sftp
Check the folder owner for the newly created folders to ensure they are owned by the Apache running user.
[root@server01 ~]# chown apache /NetworkShares -R
[root@server02 ~]# chown www-data /NetworkShares -R
[root@server01 ~]# id apache uid=48(apache) gid=48(apache) groups=48(apache)
[root@s02 ~]# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
[root@s01 ~]# sshfs -o allow_other,idmap=user,uid=48 email@example.com:/home/testsftp /NetworkShares/sftp/
Enter the password for firstname.lastname@example.org.
The UID value here should be the UID of the apache/www-data user, though this depends on the Linux distribution.
[root@s01 /]# mount |grep sftp
The output should be similar to this result:
email@example.com:/home/testsftp on /NetworkShares/sftp type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
[root@s01 /]# ls -al /NetworkShares/sftp
The file listing should be presented as seen below. All file owners should be Apache or www-data user (depending on the Linux distribution).
[root@s01 /]# echo ‘You_Super_Secret_Password’ > /root/sftp.pass
sshfs#user@sftp_server:/ NetworkSharessftp fuse ssh_command=sshpass\040-f\040/root/sftp.pass\040ssh,_netdev,rw,allow_other,reconnect,user,kernel_cache,auto_cache,uid=48,allow_other 0 0
The UID value here should match the UID of the Apache/www-data user, depending on the Linux distribution. (This should be one line in the fstab file, though it may be wrapped due to terminal settings.)
[root@s01 /]# mount -a
[root@s01 /]# mount |grep sftp
On the output, you should see your mounted SFTP resource.
Login to the FileCloud admin panel.
Go to the “Network Folders” option and click the “Add” button.
Choose “Local Area Network”, then “Next.”
Enter the name of the Network Folder and click "Next."
Select “Normal mount" and click "Next."
Enter the path to the mounted SFTP resource (/NetworkShares/sftp) and click "Next." The path is case-sensitive!
Select “Use assigned permissions” then “Create share.”
Assign a user or group to this share, and click "Finish.”
The shared path will be displayed in the list. You can always manage permissions by clicking on the edit icon:
When users assigned to this share path log in to their FileCloud, they will be able to see and access the Network Folder.
FileCloud is a powerful, hyper-secure file sharing and software solution with a wide range of features, integrations, and customization options. FileCloud’s mission revolves around creating software that customers love to use, which means supporting the tools and protocols customers prefer, including SFTP.
With these step-by-step instructions, you can integrate your FileCloud environment with your SFTP shares, so you can collaborate with internal and external teams. Use your established folders, permissions, and processes while discovering how FileCloud can support your security, governance, and collaboration goals.
Article written by Marek Frueauff (Solutions Architect) and Katie Gerhardt (Junior Product Marketing Manager)