CD or CWD

Read syntax diagramSkip visual syntax diagramCDCWDuserid.191vaddrRDRchild-subdirfilepoolid:youriduserid..subdir1..directory/../VMBFS: filepoolid:filespace//subdir1/../HMC:/subdir
Notes:

Purpose

Use the CD or CWD subcommand to change the working directory or file group on the foreign host.

Operands

userid
The user ID associated with the resource that is to be accessed.
vaddr
A minidisk virtual address. The default virtual address is 191.
RDR
Indicates the virtual reader associated with userid is to be accessed.
child-subdir
A subdirectory that is defined under the current working directory.
filepoolid
The name of the Shared File System (SFS) file pool in which the directory to be accessed is defined.
userid
The user ID that owns the SFS directory that is to be accessed. If not specified, the user ID that corresponds to the currently active login user name (as specified with the USER subcommand) is used — signified here as yourid.
subdir
The name of a subdirectory that is defined under the top-level directory defined by filepoolid:userid.
..
A special operand that changes the working directory to the parent directory on the foreign host. This operand performs the same function as the CDUP subcommand.
directory
The name of a file directory or other system-dependent file group designator on the foreign host.
/../VMBFS:filepoolid:filespace/
The name of the Byte File System (BFS) root. The VMBFS, filepoolid, and filespace tokens are all required and must be specified in uppercase.
/../HMC:
A keyword indicating a Hardware Management Console (HMC) removable medium (DVD or flash drive) that has been connected to the logical partition of a remote z/VM FTP server.

Usage Notes

  • You can also use the CWD subcommand to change the current working directory. This subcommand is interchangeable with the CD subcommand.
  • While in the FTP environment, you can issue a CD command to specify a subdirectory or fully-qualified directory name for access to SFS and BFS.
  • To work with SFS directories, TCP/IP 2.3 for VM or later must be in use on the foreign host. To work with BFS directories, TCP/IP 2.4 or later must be in use on the foreign host. To work with VM readers, TCP/IP FL320 or later must be in use on the foreign host. To work with HMC directories, TCP/IP FL540 or later must be in use on the foreign host.
  • When CD commands are used with a remote host running z/VM, your use of SFS, BFS, HMC, and virtual reader support can affect how the directory names you supply are used. When support for these resources is available, the VM FTP server will interpret the directory names you supply using the following precedence:
    1. If the current working directory is a BFS directory, the supplied directory name is treated as a BFS path name.
    2. If the string "/../VMBFS:" is present, the directory name is treated as a BFS path name.
    3. If the current working directory is an HMC directory, the supplied directory name is treated as an HMC directory name.
    4. If the string "/../HMC:" is present, the directory name is treated as an HMC directory name.
    5. If the current working directory is an SFS directory, the supplied directory name is treated as an SFS directory name.
    6. If a colon (:) is present in the directory name, it is treated as an SFS directory name.
    7. If the supplied directory name ends with either "RDR" or ".RDR", an attempt is made to change the working directory to a virtual reader.
    8. If the previously listed attempts fail to result in a successful change of directory, an attempt will be made to acquire a minidisk.
    Note: Certain SFS, HMC subdirectories, and BFS path names can present problems when you alternate the use of SFS/HMC/BFS resources and minidisks or virtual readers as working directories. When SFS, HMC subdirectories, or BFS path names exist with names that also conform to the userid.vaddr or userid.RDR directory format, you might obtain that SFS, HMC, or BFS resource as a working directory instead of an intended userid minidisk or virtual reader. This situation is dependent upon the SFS, HMC, or BFS directory hierarchy being referenced, as well as the SFS/HMC/BFS directory that is the current working directory.
  • The following restrictions apply to BFS files and directories:
    1. When a CD request is for a Byte File System (BFS) directory, only the VM user's primary GID (from the POSIXINFO statement) is used by the FTP server. The user's supplementary GID list (from the POSIXGLIST statement) is not used.
    2. When the user ID issuing a CD command has file pool administration authority for the target BFS file pool, that administration authority is not respected by the FTP server. In other words, the user ID must have explicit permission to the object through the UID and GID associated with the user ID.
  • The initial working directory you obtain after you logon to a foreign host is dependent upon that host system. For z/VM hosts, the initial working directory established, as well as the type of access to that directory (with regard to read versus write status), can be affected by several factors, such as:
    • the logon user ID you supply
    • the configuration of the FTP server
    • the use of an External Security Manager (ESM)
    • the release of TCP/IP for VM in use on foreign host.

    In many environments, the 191 minidisk of the login user ID is established as the initial working directory, by default. When possible, write access to this resource is obtained. However, these defaults can be influenced and altered by one, or a combination, of the previously cited factors.

  • If TCP/IP Function Level 320 or later is in use on the foreign host and native VM minidisk password protection is in use, access to minidisks will be achieved without the need to specify a minidisk password, when one of the following conditions is true:
    • the login user ID owns the target minidisk
    • a minidisk read, write, or multiple password of ALL is in effect for the minidisk

    For these conditions, write access will be obtained, whenever possible. If none of these conditions is applicable for this kind of environment, the ACCT subcommand must be used to provide a suitable minidisk password to gain access to the minidisk.

    For this same type of environment, but with a level of VM TCP/IP prior to Function Level 320 in use, minidisk access without the need for a minidisk password will be achieved only when a minidisk read, write, or multiple password of ALL is in effect for a minidisk. Otherwise, minidisk access will only be provided when you use the ACCT subcommand to provide a suitable minidisk password.

  • You can specify the *dev.null directory for testing throughput. If *dev.null is specified, the PUT and MPUT subcommands transfer data to the foreign host, but do not store the data at the foreign host. The GET and MGET subcommands use the working directory that was in effect before the CD *dev.null command.

Examples

CD COOK.191

where 191 is the default minidisk address.

cd server5:.os2tools

where OS2TOOLS is the SFS directory within the client's filespace in file pool SERVER5.

cd /../VMBFS:SERVER5:ROOT/user/alan

where user/alan is the directory within file space ROOT of file pool SERVER5.