Four DOS utilities enable you to view and modify the attributes of remote files accessed through a Gateway volume:
NOTE: These utilities function only on Gateway volumes.
Use CHGRP to change the group ownership of a UNIX file. You must be the owner of the file and you must be a member of the group you specify in the command line. CHGRP has the following syntax:
CHGRP [-f] group [drive:][path]filename
where
|
-f |
Suppresses output. If the CHGRP command fails, you do not receive an error message. |
|
group |
The new owner of the file. This value can be a GID number or an NFS group name. |
|
drive: |
The Gateway drive. If no drive is specified, the command uses the current drive. |
|
path |
The relative or absolute path of the directory in which the file is stored. If no path is specified, the command uses the current directory. |
|
filename |
The name of the file. You can use DOS wildcard characters. |
Use CHMOD to change a file mode. You must be the owner of the file.
CHMOD has the following syntax:
CHMOD [-f] mode [drive:][path]filename
where
|
-f |
Suppresses output. If the CHMOD command fails, you do not receive an error message. |
|
mode |
Changes the current mode or sets an absolute mode for the file. This argument can be specified numerically or symbolically. |
|
drive: |
The Gateway drive. If no drive is specified, the command uses the current drive. |
|
path |
The relative or absolute path to the directory. If no path is specified, the command uses the current directory. |
|
filename |
The name of the file. You can use DOS wildcard characters. |
A numeric argument for mode is constructed from the following:
|
400 |
Read by owner. |
|
200 |
Write by owner. |
|
100 |
Execute by owner. |
|
040 |
Read by group. |
|
020 |
Write by group. |
|
010 |
Execute by group. |
|
004 |
Read by others. |
|
002 |
Write by others. |
|
001 |
Execute by others. |
|
4000 |
Set user ID on execution. |
|
2000 |
Set group ID on execution. This bit is ignored if the file is a directory; it can only be set or cleared using symbolic mode. |
|
1000 |
This mode is usually used to control executable files only. For more information, refer to your UNIX system documentation. |
A symbolic argument for mode takes the following form:
who op permission, [op permission] ...
who is a combination of:
|
u |
user |
|
g |
group |
|
o |
other |
|
a |
all |
If you omit who, the default is a for all.
op is one of the following:
|
+ |
add |
|
- |
remove |
|
= |
add permission and remove all others |
permission is a combination of:
|
r = |
Read |
|
w = |
Write |
|
x = |
Execute |
|
s = |
Set owner/group ID |
|
t = |
Keep program in memory between processes |
The letters u, g, or o indicate that permission is to be taken from the current mode for the user-class.
Omitting permission is only useful when using =, which takes away all permissions.
Use CHOWN to change the owner of a UNIX file. You must be logged in as supervisor and the remote file system must be exported to the Gateway with root access. CHOWN has the following syntax:
CHOWN [-f] owner [drive:][path]filename
where
|
-f |
Suppresses output. If the CHOWN command fails, you do not receive an error message. |
|
owner |
The new owner. This value can be a decimal UID or a username. |
|
drive: |
The Gateway drive. If no drive is specified, the command uses the current drive. |
|
path |
The relative or absolute path of the directory in which the file is stored. If no path is specified, the current path is used. |
|
filename |
The name of the file. You can use DOS wildcard characters. |
Use LS to list all files in a path. LS has the following syntax:
LS [-acnglu8ts] [drive:][path][filename]
where
|
a |
Lists all files, including hidden files. |
|
c |
Displays the time the file was last changed. This argument has a higher priority than -u, so -luc is equivalent to -lc. |
|
n |
Displays the NetWare names for UID and GID instead of the UNIX names. |
|
g |
Displays the GID assigned to each file. |
|
l |
Displays the permission, number of links, UID, GID (if -g is specified), and the last time the file was modified. |
|
u |
Displays the last time the file was accessed. If specified with the c switch, only the time last changed displays. |
|
8 |
Allows users to find the 8.3 name from the long name. The filename specified is a long filename and the following wildcard characters are allowed: * match any characters (0 or more) |
|
t |
Sorts output by time rather than by filename. The time used to sort is the time that would be displayed if -l was specified (dependant on u and c switches). |
|
s |
Sorts output by filename. |
|
drive: |
The Gateway drive. If no drive is specified, the command uses the current drive. |
|
path |
The relative or absolute path of the file system. If no path is specified, the command uses the current path. |
|
filename |
The name of the directory or file. If no directory is specified, the command uses the current directory. DOS wildcard characters are allowed. |
The default time zone for this utility is Pacific Standard Time. If you plan to use this utility with a Gateway located in another time zone, you should set the time zone on your local DOS machine to match the time zone of the server running the Gateway as follows:
SET TZ=GMTnDT
where n is the difference in hours from Greenwich mean time (GMT) and DT is included if the time zone observes daylight savings time. If you do not set the time zone to match that of the Gateway server, the LS command functions properly, but the time and date information might be incorrect.