]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/ftpfs
audiohda: fix syntax error
[plan9front.git] / sys / man / 4 / ftpfs
1 .TH FTPFS 4
2 .SH NAME
3 ftpfs  \- file transfer protocol (FTP) file system
4 .SH SYNOPSIS
5 .B ftpfs
6 [
7 .B -/dqntc
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 via FTP to files on the remote machine.
45 .I Ftpfs
46 attempts to use FTP's `passive' mode
47 but falls back to using `active' mode if that fails.
48 If required by the remote machine,
49 .I ftpfs
50 will ask
51 .IR factotum (4)
52 for a key matching the pattern
53 .IP
54 .EX
55 proto=pass service=ftp server=\fIsystem\fP user? !password? \fIkeyspec\fP
56 .EE
57 .PP
58 (If
59 .I factotum
60 does not have such a key,
61 .I factotum
62 will prompt the user for one.)
63 .PP
64 The user names
65 .B ftp
66 and
67 .B anonymous
68 conventionally offer guest/read-only access to
69 machines.
70 Anonymous FTP may be called without using factotum
71 by using the
72 .B -a
73 option and specifying the
74 .IR password .
75 .PP
76 By default the file seen at the mount point is the user's
77 remote home directory if he has one.
78 The option
79 .B -/
80 forces the mount point to correspond to the
81 remote root.
82 The option
83 .B -r
84 forces the mount point to correspond to the
85 remote directory
86 .IR remoteroot .
87 .PP
88 To avoid seeing startup messages from the server use option
89 .BR -q .
90 To see all messages from the server use option
91 .BR -d .
92 .PP
93 By default ftpfs only caches while a file operation is in progress. The
94 .BR -c
95 flag enables caching, increasing performance but allowing outdated file and directory data to persist.
96 .PP
97 Some systems will hangup an ftp connection that has no activity
98 for a given period.  The
99 .BR -K
100 option causes ftp to send a NOP command every 15 seconds to attempt
101 to keep the connection open.  This command can cause some servers to
102 hangup, so you'll have to feel your way.
103 .PP
104 The
105 .B -t
106 option causes
107 .I ftpfs
108 to negotiate TLS encryption with the server.
109 .PP
110 To terminate the connection,
111 .B unmount
112 (see
113 .IR bind (1))
114 the mount point.
115 .PP
116 Since there is no specified format for metadata retrieved
117 in response to an FTP directory request,
118 .I ftpfs
119 has to apply heuristics to steer the interpretation.  Sometimes,
120 though rarely, these heuristics fail.  The following options are
121 meant as last resorts to try to steer interpretation.
122 .PP
123 A major clue to the heuristics is the operating system at the other
124 end.  Normally this can be determined automatically using the
125 FTP SYST command.  However, in some cases the server doesn't implement
126 the SYST command.  The
127 .B -o
128 option will force the case by specifying the name of the operating
129 system.  Known system types are:
130 .BR UNIX ,
131 .BR SUN ,
132 .BR TOPS ,
133 .BR Plan9 ,
134 .BR VM ,
135 .BR VMS ,
136 .BR MVS ,
137 .BR NetWare ,
138 .BR OS/2 ,
139 .BR TSO ,
140 and
141 .BR WINDOWS_NT .
142 .PP
143 Some systems and/or FTP servers return directory listings that don't
144 include the file extension.  The
145 .B -e
146 option allows the user to specify an extension to append to all
147 remote files (other than directories).
148 .PP
149 Finally, there are two FTP commands to retrieve the contents of a
150 directory, LIST and NLST.  LIST is approximately equivalent to
151 .L ls -l
152 and NLST to
153 .LR ls .
154 .I Ftpfs
155 normally uses LIST.  However, some FTP servers interpret LIST
156 to mean, give a wordy description of the file.
157 .I Ftpfs
158 normally notices this and switches to using NLST.  However, in
159 some rare cases, the user must force the use of NLST with the
160 .B -n
161 option.
162 .SH EXAMPLE
163 You want anonymous FTP access to the system
164 .BR export.lcs.mit.edu .
165 The first
166 .IR import (4)
167 command is only necessary if your machine does not have access to the
168 desired system, but another, called
169 .B gateway
170 in this example, does.
171 .IP
172 .EX
173 import gateway /net
174 ftpfs -a yourname@yourmachine export.lcs.mit.edu
175 .EE
176 .SH SOURCE
177 .B /sys/src/cmd/ip/ftpfs
178 .SH "SEE ALSO"
179 .IR bind (2)
180 .SH BUGS
181 Symbolic links on remote Unix systems will always have mode 0777
182 and a length of 8.
183 .PP
184 After connecting to a TOPS-20 system, the mount point will contain
185 only one directory, usually
186 .BR /n/ftp/PS:<ANONYMOUS> .
187 However, walking to any valid directory on that machine will succeed
188 and cause that directory entry to appear under the mount point.
189 .PP
190 If caching is active, remote
191 changes that have been cached will not be visible.
192 Attempting to walk to
193 .IB directory /.flush.ftpfs
194 will flush
195 .I directory
196 from the cache, thus forcing
197 .I ftpfs
198 to re-read it.
199 .PP
200 There is no way to issue the appropriate commands to handle special synthetic
201 FTP file types such as directories
202 that automatically return a
203 .B tar
204 of their contents.
205 .PP
206 .I Ftpfs
207 makes copies in
208 .B /tmp
209 of files being transferred,
210 so its effects might not be immediate.
211 If there is enough main memory, you might want to run
212 .IR ramfs (4)
213 first.
214 .PP
215 Filenames containing spaces will confuse
216 .I ftpfs
217 (and other FTP clients).