Mount FTP directory under Linux

Support Wissensdatenbank

Du bist hier:

On your own server you can easily mount an FTP storage space.

To be able to mount the cloud memory without problems it is necessary to install the curlftpfs package first:

Debian / Ubuntu:

[code language=”bash”]apt-get install curlftpfs[/code]

CentOS, Fedora, openSUSE:

[code language=”bash”]yum install curlftpfs[/code]

Then you have to create a local directory where you want to mount the FTP memory.

[code language=”bash”]mkdir /mnt/ftpshare[/code]

To store the FTP access data safely, create the file /root/.netrc.

[code language=”bash”]touch /root/.netrc[/code]

Now fill the file with the following content (use either vi, nano over SSH or an editor over SFTP):

[code language=”bash”]
machine (hostname or IP)
login web00 (FTP username)
password 12345 (FTP password)

Now we give the created file only the most necessary rights so that this file can not be read by any undermined users:

[code language="bash"]chmod 600 /root/.netrc[/code]

Next, add the following line to the end of /etc/fstab (use the hostname and directory you set in the previous step):

[code language=”bash”] /mnt/ftpshare fuse allow_other,uid=1000,gid=1000,umask=0022 0 0[/code]

The last step is to run the following command to activate the changes:

[code language=”bash”]mount -a[/code]

War dieser Artikel hilfreich?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Brauchst du Hilfe?
Related Post