Difference between revisions of "CurlFtpFS"

From ArchWiki
Jump to: navigation, search
m (Example using curlftpfs to mount a FTP folder)
m (add ja link)
 
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
[[Category:File systems]]
 
[[Category:File systems]]
[[zh-CN:Mount FTP]]
+
[[Category:File Transfer Protocol]]
 +
[[ja:CurlFtpFS]]
 +
[[zh-CN:CurlFtpFS]]
 
{{Expansion}}
 
{{Expansion}}
  
There are several packages available from the community repository or [[AUR]] that allow to mount FTP shares and interact with them just as if they were local file systems.
+
{{Related articles start}}
 +
{{Related|List of applications/Internet#FTP clients}}
 +
{{Related articles end}}
  
== Packages ==
+
{{Note|As of February 2015, curlftpfs is reported to be extremely slow, see for example [https://bugs.launchpad.net/ubuntu/+source/curlftpfs/+bug/1267749 a Ubuntu bug report] and a [http://stackoverflow.com/questions/24360479/ftp-with-curlftpfs-is-extremely-slow-to-the-point-it-is-impossible-to-work-with stackoverflow.com question].}}
These are the packages that provide a way to mount FTP shares:
+
  
* curlftpfs [recommended]
+
== Installation ==
* fuseftp
+
* lufs [outdated]
+
  
All three packages are based on FUSE library.
+
[[Install]] {{Pkg|curlftpfs}} from the [[official repositories]]
 
+
=== Example using curlftpfs to mount a FTP folder ===
+
 
+
Install curlftpfs (from the community repo)
+
# pacman -S curlftpfs
+
  
 
If needed, make sure that fuse has been started.
 
If needed, make sure that fuse has been started.
 
  # modprobe fuse
 
  # modprobe fuse
 +
 +
== Mount FTP folder as root ==
 +
 
Create the mount point and then mount the FTP folder.
 
Create the mount point and then mount the FTP folder.
 
  # mkdir /mnt/ftp
 
  # mkdir /mnt/ftp
 
  # curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password
 
  # curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password
If you want regular user access, use the following instead:
+
If you want to give other (regular) users access right, use the {{ic|allow_other}} option:
 
  # curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password,allow_other
 
  # curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password,allow_other
Do not add space after the comma or the ''allow_other'' argument won't be recognized.
+
Do not add space after the comma or the {{ic|allow_other}} argument will not be recognized.
  
 
To use FTP in active mode add the option 'ftp_port=-':
 
To use FTP in active mode add the option 'ftp_port=-':
Line 32: Line 31:
  
 
You can add this line to /etc/fstab to mount automatically.
 
You can add this line to /etc/fstab to mount automatically.
  curlftpfs#USER:PASSWORD@ftp.domain.org /mnt/mydomainorg fuse auto,user,uid=1000,allow_other 0 0
+
  curlftpfs#USER:PASSWORD@ftp.domain.org /mnt/mydomainorg fuse auto,user,uid=1000,allow_other,_netdev 0 0
  
To prevent the password to be shown in the process list, create a {{ic|.netrc}} file in the home directory of the user running curlftpfs and chmod 600 with the following content:
+
{{Tip|1=You can use codepage="''string''" when having problems with non-US English characters on servers that do not support UTF8, e.g. codepage="iso8859-1"}}
 +
 
 +
To prevent the password to be shown in the process list, create a {{ic|.netrc}} file in the home directory of the user running curlftpfs and {{ic|chmod 600}} with the following content:
  
 
  machine ftp.yourserver.com
 
  machine ftp.yourserver.com
 
  login username
 
  login username
 
  password mypassword
 
  password mypassword
 +
 +
== Mount FTP folder as normal user ==
 +
 +
You can also mount as normal user (always use the {{ic|.netrc}} file for the credentials and ssl encryption!):
 +
$ mkdir ~/my-server
 +
<nowiki>$ curlftpfs -o ssl,utf8 ftp://my-server.tld/ ~/my-server</nowiki>
 +
if the answer is
 +
Error connecting to ftp: QUOT command failed with 500
 +
then the server does not support the {{ic|utf8}} option. Leave it out and all will be fine.
 +
{{Tip|1=If need be try setting the encoding with for example -o codepage="iso8859-1"}}
 +
 +
To unmount:
 +
$ fusermount -u ~/my-server

Latest revision as of 14:15, 14 May 2016

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:CurlFtpFS#)
Note: As of February 2015, curlftpfs is reported to be extremely slow, see for example a Ubuntu bug report and a stackoverflow.com question.

Installation

Install curlftpfs from the official repositories

If needed, make sure that fuse has been started.

# modprobe fuse

Mount FTP folder as root

Create the mount point and then mount the FTP folder.

# mkdir /mnt/ftp
# curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password

If you want to give other (regular) users access right, use the allow_other option:

# curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password,allow_other

Do not add space after the comma or the allow_other argument will not be recognized.

To use FTP in active mode add the option 'ftp_port=-':

# curlftpfs ftp.yourserver.com /mnt/ftp/ -o user=username:password,allow_other,ftp_port=-

You can add this line to /etc/fstab to mount automatically.

curlftpfs#USER:PASSWORD@ftp.domain.org /mnt/mydomainorg fuse auto,user,uid=1000,allow_other,_netdev 0 0
Tip: You can use codepage="string" when having problems with non-US English characters on servers that do not support UTF8, e.g. codepage="iso8859-1"

To prevent the password to be shown in the process list, create a .netrc file in the home directory of the user running curlftpfs and chmod 600 with the following content:

machine ftp.yourserver.com
login username
password mypassword

Mount FTP folder as normal user

You can also mount as normal user (always use the .netrc file for the credentials and ssl encryption!):

$ mkdir ~/my-server
$ curlftpfs -o ssl,utf8 ftp://my-server.tld/ ~/my-server

if the answer is

Error connecting to ftp: QUOT command failed with 500

then the server does not support the utf8 option. Leave it out and all will be fine.

Tip: If need be try setting the encoding with for example -o codepage="iso8859-1"

To unmount:

$ fusermount -u ~/my-server