draft-ietf-secsh-filexfer-02.2.ps

来自「OTP是开放电信平台的简称」· PS 代码 · 共 2,134 行 · 第 1/5 页

PS
2,134
字号
(   protocol.) s5 569 M(   Servers SHOULD interpret a path name component ".." as referring to) s5 558 M(   the parent directory, and "." as referring to the current directory.) s5 547 M(   If the server implementation limits access to certain parts of the) s5 536 M(   file system, it must be extra careful in parsing file names when) s5 525 M(   enforcing such restrictions.  There have been numerous reported) s5 514 M(   security bugs where a ".." in a path name has allowed access outside) s5 503 M(   the intended area.) s5 481 M(   An empty path name is valid, and it refers to the user's default) s5 470 M(   directory \(usually the user's home directory\).) s5 448 M(   Otherwise, no syntax is defined for file names by this specification.) s5 437 M(   Clients should not make any other assumptions; however, they can) s5 426 M(   splice path name components returned by SSH_FXP_READDIR together) s5 415 M(   using a slash \('/'\) as the separator, and that will work as expected.) s5 393 M(   It is understood that the lack of well-defined semantics for file) s5 382 M(   names may cause interoperability problems between clients and servers) s5 371 M(   using radically different operating systems.  However, this approach) s5 360 M(   is known to work acceptably with most systems, and alternative) s5 349 M(   approaches that e.g.  treat file names as sequences of structured) s5 338 M(   components are quite complicated.) s5 316 M(6.3 Opening, Creating, and Closing Files) s5 294 M(    Files are opened and created using the SSH_FXP_OPEN message, whose) s5 283 M(   data part is as follows:) s5 261 M(        uint32        id) s5 250 M(        string        filename) s5 239 M(        uint32        pflags) s5 228 M(        ATTRS         attrs) s5 206 M(   The `id' field is the request identifier as for all requests.) s5 184 M(   The `filename' field specifies the file name.  See Section ``File) s5 173 M(   Names'' for more information.) s5 129 M(Ylonen & Lehtinen         Expires April 1, 2002                [Page 11]) s_RSPStoPSsaved restoreuserdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 421.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclipPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 12 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft         SSH File Transfer Protocol           October 2001) s5 690 M(    The `pflags' field is a bitmask.  The following bits have been) s5 679 M(   defined.) s5 657 M(        #define SSH_FXF_READ            0x00000001) s5 646 M(        #define SSH_FXF_WRITE           0x00000002) s5 635 M(        #define SSH_FXF_APPEND          0x00000004) s5 624 M(        #define SSH_FXF_CREAT           0x00000008) s5 613 M(        #define SSH_FXF_TRUNC           0x00000010) s5 602 M(        #define SSH_FXF_EXCL            0x00000020) s5 580 M(   These have the following meanings:) s5 558 M(   SSH_FXF_READ) s5 547 M(      Open the file for reading.) s5 525 M(   SSH_FXF_WRITE) s5 514 M(      Open the file for writing.  If both this and SSH_FXF_READ are) s5 503 M(      specified, the file is opened for both reading and writing.) s5 481 M(   SSH_FXF_APPEND) s5 470 M(      Force all writes to append data at the end of the file.) s5 448 M(   SSH_FXF_CREAT) s5 437 M(      If this flag is specified, then a new file will be created if one) s5 426 M(      does not already exist \(if O_TRUNC is specified, the new file will) s5 415 M(      be truncated to zero length if it previously exists\).) s5 393 M(   SSH_FXF_TRUNC) s5 382 M(      Forces an existing file with the same name to be truncated to zero) s5 371 M(      length when creating a file by specifying SSH_FXF_CREAT.) s5 360 M(      SSH_FXF_CREAT MUST also be specified if this flag is used.) s5 338 M(   SSH_FXF_EXCL) s5 327 M(      Causes the request to fail if the named file already exists.) s5 316 M(      SSH_FXF_CREAT MUST also be specified if this flag is used.) s5 294 M(   The `attrs' field specifies the initial attributes for the file.) s5 283 M(   Default values will be used for those attributes that are not) s5 272 M(   specified.  See Section ``File Attributes'' for more information.) s5 250 M(   Regardless the server operating system, the file will always be) s5 239 M(   opened in "binary" mode \(i.e., no translations between different) s5 228 M(   character sets and newline encodings\).) s5 206 M(   The response to this message will be either SSH_FXP_HANDLE \(if the) s5 195 M(   operation is successful\) or SSH_FXP_STATUS \(if the operation fails\).) s5 129 M(Ylonen & Lehtinen         Expires April 1, 2002                [Page 12]) s_RSPStoPSsaved restore%%Page: (12,13) 7userdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 0.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclip/showpage{}def/copypage{}def/erasepage{}defPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 13 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft         SSH File Transfer Protocol           October 2001) s5 690 M(    A file is closed by using the SSH_FXP_CLOSE request.  Its data field) s5 679 M(   has the following format:) s5 657 M(        uint32     id) s5 646 M(        string     handle) s5 624 M(   where `id' is the request identifier, and `handle' is a handle) s5 613 M(   previously returned in the response to SSH_FXP_OPEN or) s5 602 M(   SSH_FXP_OPENDIR.  The handle becomes invalid immediately after this) s5 591 M(   request has been sent.) s5 569 M(   The response to this request will be a SSH_FXP_STATUS message.  One) s5 558 M(   should note that on some server platforms even a close can fail.) s5 547 M(   This can happen e.g.  if the server operating system caches writes,) s5 536 M(   and an error occurs while flushing cached writes during the close.) s5 514 M(6.4 Reading and Writing) s5 492 M(    Once a file has been opened, it can be read using the SSH_FXP_READ) s5 481 M(   message, which has the following format:) s5 459 M(        uint32     id) s5 448 M(        string     handle) s5 437 M(        uint64     offset) s5 426 M(        uint32     len) s5 404 M(   where `id' is the request identifier, `handle' is an open file handle) s5 393 M(   returned by SSH_FXP_OPEN, `offset' is the offset \(in bytes\) relative) s5 382 M(   to the beginning of the file from where to start reading, and `len') s5 371 M(   is the maximum number of bytes to read.) s5 349 M(   In response to this request, the server will read as many bytes as it) s5 338 M(   can from the file \(up to `len'\), and return them in a SSH_FXP_DATA) s5 327 M(   message.  If an error occurs or EOF is encountered before reading any) s5 316 M(   data, the server will respond with SSH_FXP_STATUS.  For normal disk) s5 305 M(   files, it is guaranteed that this will read the specified number of) s5 294 M(   bytes, or up to end of file.  For e.g.  device files this may return) s5 283 M(   fewer bytes than requested.) s5 261 M(    Writing to a file is achieved using the SSH_FXP_WRITE message, which) s5 250 M(   has the following format:) s5 228 M(        uint32     id) s5 217 M(        string     handle) s5 206 M(        uint64     offset) s5 195 M(        string     data) s5 173 M(   where `id' is a request identifier, `handle' is a file handle) s5 129 M(Ylonen & Lehtinen         Expires April 1, 2002                [Page 13]) s_RSPStoPSsaved restoreuserdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 421.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclipPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 14 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft         SSH File Transfer Protocol           October 2001) s5 690 M(   returned by SSH_FXP_OPEN, `offset' is the offset \(in bytes\) from the) s5 679 M(   beginning of the file where to start writing, and `data' is the data) s5 668 M(   to be written.) s5 646 M(   The write will extend the file if writing beyond the end of the file.) s5 635 M(   It is legal to write way beyond the end of the file; the semantics) s5 624 M(   are to write zeroes from the end of the file to the specified offset) s5 613 M(   and then the data.  On most operating systems, such writes do not) s5 602 M(   allocate disk space but instead leave "holes" in the file.) s5 580 M(   The server responds to a write request with a SSH_FXP_STATUS message.) s5 558 M(6.5 Removing and Renaming Files) s5 536 M(    Files can be removed using the SSH_FXP_REMOVE message.  It has the) s5 525 M(   following format:) s5 503 M(        uint32     id) s5 492 M(        string     filename) s5 470 M(   where `id' is the request identifier and `filename' is the name of) s5 459 M(   the file to be removed.  See Section ``File Names'' for more) s5 448 M(   information.  This request cannot be used to remove directories.) s5 426 M(   The server will respond to this request with a SSH_FXP_STATUS) s5 415 M(   message.) s5 393 M(    Files \(and directories\) can be renamed using the SSH_FXP_RENAME) s5 382 M(   message.  Its data is as follows:) s5 360 M(        uint32     id) s5 349 M(        string     oldpath) s5 338 M(        string     newpath) s5 316 M(   where `id' is the request identifier, `oldpath' is the name of an) s5 305 M(   existing file or directory, and `newpath' is the new name for the) s5 294 M(   file or directory.  It is an error if there already exists a file) s5 283 M(   with the name specified by newpath.  The server may also fail rename) s5 272 M(   requests in other situations, for example if `oldpath' and `newpath') s5 261 M(   point to different file systems on the server.) s5 239 M(   The server will respond to this request with a SSH_FXP_STATUS) s5 228 M(   message.) s5 129 M(Ylonen & Lehtinen         Expires April 1, 2002                [Page 14]) s_RSPStoPSsaved restore%%Page: (14,15) 8userdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 0.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclip/showpage{}def/copypage{}def/erasepage{}defPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 15 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft         SSH File Transfer Protocol           October 2001) s5 690 M(6.6 Creating and Deleting Directories) s5 668 M(    New directories can be created using the SSH_FXP_MKDIR request.  It) s5 657 M(   has the following format:) s5 635 M(        uint32     id) s5 624 M(        string     path) s5 613 M(        ATTRS      attrs) s5 591 M(   where `id' is the request identifier, `path' and `attrs' specifies) s5 580 M(   the modifications to be made to its attributes.  See Section ``File) s5 569 M(   Names'' for more information on file names.  Attributes are discussed) s5 558 M(   in more detail in Section ``File Attributes''.  specifies the) s5 547 M(   directory to be created.  An error will be returned if a file or) s5 536 M(   directory with the specified path already exists.  The server will) s5 525 M(   respond to this request with a SSH_FXP_STATUS message.) s5 503 M(    Directories can be removed using the SSH_FXP_RMDIR request, which) s5 492 M(   has the following format:) s5 470 M(        uint32     id) s5 459 M(        string     path) s5 437 M(   where `id' is the request identifier, and `path' specifies the) s5 426 M(   directory to be removed.  See Section ``File Names'' for more) s5 415 M(   information on file names.  An error will be returned if no directory) s5 404 M(   with the specified path exists, or if the specified directory is not) s5 393 M(   empty, or if the path specified a file system object other than a) s5 382 M(   directory.  The server responds to this request with a SSH_FXP_STATUS) s5 371 M(   message.) s5 349 M(6.7 Scanning Directories) s5 327 M(   The files in a directory can be listed using the SSH_FXP_OPENDIR and) s

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?