1
0

ftpfs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. .TH FTPFS 4
  2. .SH NAME
  3. ftpfs \- file transfer protocol (FTP) file system
  4. .SH SYNOPSIS
  5. .B ftpfs
  6. [
  7. .B -/dqnt
  8. ]
  9. [
  10. .B -m
  11. .I mountpoint
  12. ]
  13. [
  14. .B -a
  15. .I password
  16. ]
  17. [
  18. .B -e
  19. .I ext
  20. ]
  21. [
  22. .B -k
  23. .I keyspec
  24. ]
  25. [
  26. .B -o
  27. .I os
  28. ]
  29. [
  30. .B -r
  31. remoteroot
  32. ]
  33. .I system
  34. .SH DESCRIPTION
  35. .I Ftpfs
  36. dials the TCP file transfer protocol (FTP) port, 21, on
  37. .I system
  38. and mounts itself (see
  39. .IR bind (2))
  40. on
  41. .I mountpoint
  42. (default
  43. .BR /n/ftp )
  44. to provide access to files on the remote machine.
  45. If required by the remote machine,
  46. .I ftpfs
  47. will ask
  48. .IR factotum (4)
  49. for a key matching the pattern
  50. .IP
  51. .EX
  52. proto=pass service=ftp server=\fIsystem\fP user? !password? \fIkeyspec\fP
  53. .EE
  54. .PP
  55. (If
  56. .I factotum
  57. does not have such a key,
  58. .I factotum
  59. will prompt the user for one.)
  60. .PP
  61. The user names
  62. .B ftp
  63. and
  64. .B anonymous
  65. conventionally offer guest/read-only access to
  66. machines.
  67. Anonymous FTP may be called without using factotum
  68. by using the
  69. .B -a
  70. option and specifying the
  71. .IR password .
  72. .PP
  73. By default the file seen at the mount point is the user's
  74. remote home directory if he has one.
  75. The option
  76. .B -/
  77. forces the mount point to correspond to the
  78. remote root.
  79. The option
  80. .B -r
  81. forces the mount point to correspond to the
  82. remote directory
  83. .IR remoteroot .
  84. .PP
  85. To avoid seeing startup messages from the server use option
  86. .BR -q .
  87. To see all messages from the server use option
  88. .BR -d .
  89. .PP
  90. Some systems will hangup an ftp connection that has no activity
  91. for a given period. The
  92. .BR -K
  93. option causes ftp to send a NOP command every 15 seconds to attempt
  94. to keep the connection open. This command can cause some servers to
  95. hangup, so you'll have to feel your way.
  96. .PP
  97. The
  98. .B -t
  99. option causes
  100. .I ftpfs
  101. to negotiate TLS encryption with the server.
  102. .PP
  103. To terminate the connection,
  104. .B unmount
  105. (see
  106. .IR bind (1))
  107. the mount point.
  108. .PP
  109. Since there is no specified format for metadata retrieved
  110. in response to an FTP directory request,
  111. .I ftpfs
  112. has to apply heuristics to steer the interpretation. Sometimes,
  113. though rarely, these heuristics fail. The following options are
  114. meant as last resorts to try to steer interpretation.
  115. .PP
  116. A major clue to the heuristics is the operating system at the other
  117. end. Normally this can be determined automatically using the
  118. FTP SYST command. However, in some cases the server doesn't implement
  119. the SYST command. The
  120. .B -o
  121. option will force the case by specifying the name of the operating
  122. system. Known system types are are:
  123. .BR Unix ,
  124. .BR Sun ,
  125. .BR Tops ,
  126. .BR Plan9
  127. .BR VM ,
  128. .BR VMS ,
  129. .BR MVS ,
  130. .BR NetWare ,
  131. .BR OS/2 ,
  132. .BR TSO ,
  133. and
  134. .BR WINDOWS_NT .
  135. .PP
  136. Some systems and/or FTP servers return directory listings that don't
  137. include the file extension. The
  138. .B -e
  139. option allows the user to specify an extension to append to all
  140. remote files (other than directories).
  141. .PP
  142. Finally, there are two FTP commands to retrieve the contents of a
  143. directory, LIST and NLST. LIST is approximately equivalent to
  144. .L ls -l
  145. and NLST to
  146. .LR ls .
  147. .I Ftpfs
  148. normally uses LIST. However, some FTP servers interpret LIST
  149. to mean, give a wordy description of the file.
  150. .I Ftpfs
  151. normally notices this and switches to using NLST. However, in
  152. some rare cases, the user must force the use of NLST with the
  153. .B -n
  154. option.
  155. .SH EXAMPLE
  156. You want anonymous FTP access to the system
  157. .BR export.lcs.mit.edu .
  158. The first
  159. .IR import (4)
  160. command is only necessary if your machine does not have access to the
  161. desired system, but another, called
  162. .B gateway
  163. in this example, does.
  164. .IP
  165. .EX
  166. import gateway /net
  167. ftpfs -a yourname@yourmachine export.lcs.mit.edu
  168. .EE
  169. .SH SOURCE
  170. .B /sys/src/cmd/ip/ftpfs
  171. .SH "SEE ALSO"
  172. .IR bind (2)
  173. .SH BUGS
  174. .PP
  175. Symbolic links on remote Unix systems will always have mode 0777
  176. and a length of 8.
  177. .PP
  178. After connecting to a TOPS-20 system, the mount point will contain
  179. only one directory, usually
  180. .BR /n/ftp/PS:<ANONYMOUS> .
  181. However, walking to any valid directory on that machine will succeed
  182. and cause that directory entry to appear under the mount point.
  183. .PP
  184. .I Ftpfs
  185. caches files and directories. A directory will fall from the cache
  186. after 5 quiescent minutes or if the local user changes the
  187. directory by writing or removing a file.
  188. Otherwise, remote
  189. changes to the directory that occur after the directory has
  190. been cached might not be immediately visible.
  191. .PP
  192. There is no way to issue the appropriate commands to handle special synthetic
  193. FTP file types such as directories
  194. that automatically return a
  195. .B tar
  196. of their contents.