1
0

ftpfs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. .TH FTPFS 4
  2. .SH NAME
  3. ftpfs \- file transfer protocol (FTP) file system
  4. .SH SYNOPSIS
  5. .B ftpfs
  6. [
  7. .B -/dqn
  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. To terminate the connection,
  98. .B unmount
  99. (see
  100. .IR bind (1))
  101. the mount point.
  102. .PP
  103. Since there is no specified format for metadata retrieved
  104. in response to an FTP directory request,
  105. .I ftpfs
  106. has to apply heuristics to steer the interpretation. Sometimes,
  107. though rarely, these heuristics fail. The following options are
  108. meant as last resorts to try to steer interpretation.
  109. .PP
  110. A major clue to the heuristics is the operating system at the other
  111. end. Normally this can be determined automatically using the
  112. FTP SYST command. However, in some cases the server doesn't implement
  113. the SYST command. The
  114. .B -o
  115. option will force the case by specifying the name of the operating
  116. system. Known system types are are:
  117. .BR Unix ,
  118. .BR Sun ,
  119. .BR Tops ,
  120. .BR Plan9
  121. .BR VM ,
  122. .BR VMS ,
  123. .BR MVS ,
  124. .BR NetWare ,
  125. .BR OS/2 ,
  126. .BR TSO ,
  127. and
  128. .BR WINDOWS_NT .
  129. .PP
  130. Some systems and/or FTP servers return directory listings that don't
  131. include the file extension. The
  132. .B -e
  133. option allows the user to specify an extension to append to all
  134. remote files (other than directories).
  135. .PP
  136. Finally, there are two FTP commands to retrieve the contents of a
  137. directory, LIST and NLST. LIST is approximately equivalent to
  138. .L ls -l
  139. and NLST to
  140. .LR ls .
  141. .I Ftpfs
  142. normally uses LIST. However, some FTP servers interpret LIST
  143. to mean, give a wordy description of the file.
  144. .I Ftpfs
  145. normally notices this and switches to using NLST. However, in
  146. some rare cases, the user must force the use of NLST with the
  147. .B -n
  148. option.
  149. .SH EXAMPLE
  150. You want anonymous FTP access to the system
  151. .BR export.lcs.mit.edu .
  152. The first
  153. .IR import (4)
  154. command is only necessary if your machine does not have access to the
  155. desired system, but another, called
  156. .B gateway
  157. in this example, does.
  158. .IP
  159. .EX
  160. import gateway /net
  161. ftpfs -a yourname@yourmachine export.lcs.mit.edu
  162. .EE
  163. .SH SOURCE
  164. .B /sys/src/cmd/ip/ftpfs
  165. .SH "SEE ALSO"
  166. .IR bind (2)
  167. .SH BUGS
  168. .PP
  169. Symbolic links on remote Unix systems will always have mode 0777
  170. and a length of 8.
  171. .PP
  172. After connecting to a TOPS-20 system, the mount point will contain
  173. only one directory, usually
  174. .BR /n/ftp/PS:<ANONYMOUS> .
  175. However, walking to any valid directory on that machine will succeed
  176. and cause that directory entry to appear under the mount point.
  177. .PP
  178. .I Ftpfs
  179. caches files and directories. A directory will fall from the cache
  180. after 5 quiescent minutes or if the local user changes the
  181. directory by writing or removing a file.
  182. Otherwise, remote
  183. changes to the directory that occur after the directory has
  184. been cached might not be immediately visible.
  185. .PP
  186. There is no way to issue the appropriate commands to handle special synthetic
  187. FTP file types such as directories
  188. that automatically return a
  189. .B tar
  190. of their contents.