Manual Pages


Table of Contents

NAME

na_symlink.translations - Symbolic link translations to be applied to CIFS path lookups

SYNOPSIS

/etc/symlink.translations

DESCRIPTION

When the CIFS server encounters a symbolic link (also called a "symlink," or "soft link"), it attempts to follow the link. If the symlink target is a path that starts with a "/", the node must interpret the rest of the path relative to the root of the file system. On the node, there is no way to know how NFS clients (which must be used to create the symlinks) might have mounted filesystems, so there is no reliable way to follow such absolute, or "rooted" symlinks. The symlink.translations file enables you to use absolute symlinks by mapping them to CIFS-based paths.

The entries in this file are similar to the httpd.translations file. There are two formats for file entries, as follows:

Map template result

Widelink template [@qtree] result

Any request that matches template is replaced with the result string given. Note that the result path for a "Map" entry must point to a destination within the share to which the client is connected. This is because the client has only been authenticated to that share; therefore access is limited to the same share for security reasons. A result path for a "Widelink" entry may point anywhere, thus the name "wide symlink" or widelink for short. Widelinks have these limitations-- the node share on which the symlink resides must be enabled for wide symlinks, the CIFS client must support Microsoft's Dfs protocol, and the destination must be able to function as a Dfs leaf node. By using Dfs requests, the node causes the client to authenticate with the destination and thus enforces security. To enable a node share for "wide symlinks", use the "cifs shares -change" node console command.

Both templates and results might (and usually do) contain wildcards (a star "*" character). The wildcard behaves like a shell wildcard in the template string, matching zero or more characters, including the slash ("/") character. In the result string, a wildcard causes text from the corresponding match in the template string to be inserted into the result.

The entries are examined in the order they appear in the file until a match is found or the lookup fails.

EXAMPLES

This example maps absolute symlinks that start with "/u/home" to go to the node path "/vol/vol2/home". Also, symlinks starting with "/u" go to "/vol/vol0". Note that you should put the more restrictive entries first to avoid premature mapping since the matches are done in order.

#
# Example Map symlink translations
#
Map /u/home/* /vol/vol2/home/*
Map /u/* /vol/vol0/*

The next example maps absolute symlinks that start with "/u/docs/" to go to the node path "\\node_name\engr\tech pubs". Note that widelink result paths use CIFS pathname syntax (backslashes are separators, spaces in path components are allowed, and so on).

#
# Example Widelink symlink translation
#
Widelink /u/docs/* \\node_name\engr\tech pubs\*

The next example maps absolute symlinks that start with "/u/joe". Note that depending on how NFS mounts are set up, it is possible that there could be several absolute symlinks pointing to "/u/joe" which need to have differing destinations. The qtree in which a symlink resides can optionally be used to distinguish destinations. Thus, following an absolute symlink starting with "/u/joe" in qtree /vol/vol1/mixed takes the client to "\\node_name\home\joe", while symlinks in other qtrees take the client to "\\node_name\test tools\joe".

#
# Example Widelink symlink translations #
Widelink /u/joe/* @/vol/vol1/mixed \\node_name\home\joe\*
Widelink /u/joe/* \\node_name\test tools\joe\*

Note that there is no theoretical reason why a wide symlink can't point to another node or indeed any NT server, though it may be difficult to imagine the translated link making sense to the Unix client which created the original symlink.

#
# More Widelink examples
#
Widelink /u/joe/* @/vol/vol1/mixed \\mynode2\users2\joe\*
Widelink /u/joe/* \\joe-PC\Program Files\*

SEE ALSO

na_cifs_shares(1)


Table of Contents