hlfsd (8) Linux Manual Page
hlfsd – home-link file system daemon
Synopsis
hlfsd [ -fhnpvC ] [ -a alt_dir ] [ -c cache-interval ] [ -g group ] [ -i reload-interval ] [ -l logfile ] [ -o mount-options ] [ -x log-options ] [ -D debug-options ] [ -P password-file ] [ linkname [ subdir ] ]
Description
Hlfsd is a daemon which implements a filesystem containing a symbolic link to subdirectory within a user’s home directory, depending on the user which accessed that link. It was primarily designed to redirect incoming mail to users’ home directories, so that it can read from anywhere.
Hlfsd operates by mounting itself as an NFS server for the directory containing linkname, which defaults to /hlfs/home. Lookups within that directory are handled by hlfsd, which uses the password map to determine how to resolve the lookup. The directory will be created if it doesn’t already exist. The symbolic link will be to the accessing user’s home directory, with subdir appended to it. If not specified, subdir defaults to .hlfsdir. This directory will also be created if it does not already exist.
A SIGTERM sent to hlfsd will cause it to shutdown. A SIGHUP will flush the internal caches, and reload the password map. It will also close and reopen the log file, to enable the original log file to be removed or rotated. A SIGUSR1 will cause it to dump its internal table of user IDs and home directories to the file /usr/tmp/hlfsd.dump.XXXXXX.
Options
-aalt_dir- Alternate directory. The name of the directory to which the symbolic link returned by
hlfsdwill point, if it cannot access the home directory of the user. This defaults to/var/hlfs. This directory will be created if it doesn’t exist. It is expected that either users will read these files, or the system administrators will run a script to resend this "lost mail" to its owner. -ccache-interval- Caching interval.
Hlfsdwill cache the validity of home directories for this interval, in seconds. Entries which have been verified within the last cache-interval seconds will not be verified again, since the operation could be expensive, and the entries are most likely still valid. After the interval has expired,hlfsdwill re-verify the validity of the user’s home directory, and reset the cache time-counter. The default value for cache-interval is 300 seconds (5 minutes). -f- Force fast startup. This option tells
hlfsdto skip startup-time consistency checks such as existence of mount directory, alternate spool directory, symlink to be hidden under the mount directory, their permissions and validity. -ggroup- Set the special group HLFS_GID to group. Programs such as
fromorcomsat, which access the mailboxes of other users) must be setgid HLFS_GID to work properly. The default group is "hlfs". If no group is provided, and there is no group "hlfs", this feature is disabled. -h- Help. Print a brief help message, and exit.
-ireload-interval- Map-reloading interval. Each reload-interval seconds,
hlfsdwill reload the password map.Hlfsdneeds the password map for the UIDs and home directory pathnames.Hlfsdschedules a SIGALRM to reload the password maps. A SIGHUP sent tohlfsdwill force it to reload the maps immediately. The default value for reload-interval is 900 seconds (15 minutes.) -llogfile- Specify a log file to which
hlfsdwill record events. If logfile is the stringsyslogthen the log messages will be sent to the system log daemon by syslog(3), using the LOG_DAEMON facility. This is also the default. -n- No verify.
Hlfsdwill not verify the validity of the symbolic link it will be returning, or that the user’s home directory contains sufficient disk-space for spooling. This can speed uphlfsdat the cost of possibly returning symbolic links to home directories which are not currently accessible or are full. By default,hlfsdvalidates the symbolic-link in the background. The-noption overrides the meaning of the-coption, since no caching is necessary. -omount-options- Mount options. Mount options which
hlfsdwill use to mount itself on top of dirname. By default, mount-options is set to "ro". If the system supports symbolic-link caching, default options are set to "ro,nocache". -p- Print PID. Outputs the process-id of
hlfsdto standard output where it can be saved into a file. -v- Version. Displays version information to standard error.
-xlog-options- Specify run-time logging options. The options are a comma separated list chosen from: fatal, error, user, warn, info, map, stats, all.
-C- Force
hlfsdto run on systems that cannot turn off the NFS attribute-cache. Use of this option on those systems is discouraged, as it may result in loss or mis-delivery of mail. The option is ignored on systems that can turn off the attribute-cache. -Dlog-options- Select from a variety of debugging options. Prefixing an option with the string
noreverses the effect of that option. Options are cumulative. The most useful option isall. Since this option is only used for debugging other options are not documented here. A fuller description is available in the program source. A SIGUSR1 sent tohlfsdwill cause it to dump its internal password map to the file/usr/tmp/hlfsd.dump.XXXXXX. -Ppassword-file- Read the user-name, user-id, and home directory information from the file password-file. Normally,
hlfsdwill use getpwent(3) to read the password database. This option allows you to override the default database, and is useful if you want to map users’ mail files to a directory other than their home directory. Only the username, uid, and home-directory fields of the file password-file are read and checked. All other fields are ignored. The file password-file must otherwise be compliant with Unix System 7 colon-delimited format passwd(4).
Files
/hlfs- directory under which
hlfsdmounts itself and manages the symbolic linkhome. .hlfsdir- default sub-directory in the user’s home directory, to which the
homesymbolic link returned byhlfsdpoints. /var/hlfs- directory to which
homesymbolic link returned byhlfsdpoints if it is unable to verify the that user’s home directory is accessible.
See Also
mail(1), getgrent(3), getpwent(3), mnttab(4), passwd(4), mtab(5), amd(8), automount(8), cron(8), mount(8), sendmail(8), umount(8).
HLFSD: Delivering Email to Your $HOME, in Proc. LISA-VII, The 7th Usenix System Administration Conference, November 1993.
“am-utils” info(1) entry.
Linux NFS and Automounter Administration by Erez Zadok, ISBN 0-7821-2739-8, (Sybex, 2001).
Authors
Erez Zadok <ezk [at] cs.sunysb.edu>, Computer Science Department, Stony Brook University, Stony Brook, New York, USA. and Alexander Dupuy <dupuy [at] smarts.com>, System Management ARTS, White Plains, New York, USA.
Other authors and contributors to am-utils are listed in the AUTHORS file distributed with am-utils.
