ftpfs 4.0 KB

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