# cups-files.conf

The /etc/cups/cups-files.conf file contains configuration directives that control the files, directories. users. and groups that are used by the CUPS scheduler, `cupsd(8)`. Each directive is listed on a line by itself followed by its value. Comments are introduced using the number sign ("#") character at the beginning of a line.

## AccessLog

### Examples

    AccessLog /var/log/cups/access_log
    AccessLog /var/log/cups/access_log-%s
    AccessLog syslog

### Description

The `AccessLog` directive sets the name of the access log file. If the filename is not absolute then it is assumed to be relative to the `ServerRoot` directory. The access log file is stored in "common log format" and can be used by any web access reporting tool to generate a report on CUPS server activity.

The server name can be included in the filename by using `%s` in the name.

The special name "syslog" can be used to send the access information to the system log instead of a plain file.

The default access log file is /var/log/access_log.

## CUPS 1.1.15ConfigFilePerm

### Examples

    ConfigFilePerm 0644
    ConfigFilePerm 0640

### Description

The `ConfigFilePerm` directive specifies the permissions to use when the scheduler writes configuration and cache files, typically in response to IPP or HTTP requests. The default is 644 on OS X and 640 on all other operating systems.

> Note:

> The permissions for the printers.conf file are always masked to only allow access from the scheduler user (typically root). This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.

## DataDir

### Examples

    DataDir /usr/share/cups

### Description

The `DataDir` directive sets the directory to use for data files.

## DocumentRoot

### Examples

    DocumentRoot /usr/share/doc/cups
    DocumentRoot /foo/bar/doc/cups

### Description

The `DocumentRoot` directive specifies the location of web content for the HTTP server in CUPS. If an absolute path is not specified then it is assumed to be relative to the `ServerRoot` directory. The default directory is /usr/share/doc/cups.

Documents are first looked up in a sub-directory for the primary language requested by the client (e.g. /usr/share/doc/cups/fr/...) and then directly under the `DocumentRoot` directory (e.g. /usr/share/doc/cups/...), so it is possible to localize the web content by providing subdirectories for each language needed.

## ErrorLog

### Examples

    ErrorLog /var/log/cups/error_log
    ErrorLog /var/log/cups/error_log-%s
    ErrorLog syslog

### Description

The `ErrorLog` directive sets the name of the error log file. If the filename is not absolute then it is assumed to be relative to the `ServerRoot` directory. The default error log file is /var/log/cups/error_log.

The server name can be included in the filename by using `%s` in the name.

The special name "syslog" can be used to send the error information to the system log instead of a plain file.

## CUPS 1.4/OS X 10.6FatalErrors

### Examples

    FatalErrors none
    FatalErrors all
    FatalErrors browse
    FatalErrors config
    FatalErrors listen
    FatalErrors log
    FatalErrors permissions
    FatalErrors all -permissions
    FatalErrors config permissions log

### Description

The `FatalErrors` directive determines whether certain kinds of errors are fatal. The following kinds of errors are currently recognized:

- `none` - No errors are fatal
- `all` - All of the errors below are fatal
- `browse` - Browsing initialization errors are fatal, for example failed binding to the CUPS browse port or failed connections to LDAP servers
- `config` - Configuration file syntax errors are fatal
- `listen` - Listen or Port errors are fatal, except for IPv6 failures on the loopback or "any" addresses
- `log` - Log file creation or write errors are fatal
- `permissions` - Bad startup file permissions are fatal, for example shared SSL certificate and key files with world- read permissions

Multiple errors can be listed, and the form "-kind" can be used with `all` to remove specific kinds of errors. The default setting is `config`.

## CUPS 1.1.18FileDevice

### Examples

    FileDevice Yes
    FileDevice No

### Description

The `FileDevice` directive determines whether the scheduler allows new printers to be added using device URIs of the form `file:/filename`. File devices are most often used to test new printer drivers and do not support raw file printing.

The default setting is `No`.

> Note:

> File devices are managed by the scheduler. Since the scheduler normally runs as the root user, file devices can be used to overwrite system files and potentially gain unauthorized access to the system. If you must create printers using file devices, we recommend that you set the `FileDevice` directive to `Yes` for only as long as you need to add the printers to the system, and then reset the directive to `No`.

## CUPS 1.1.3FontPath

### Examples

    FontPath /foo/bar/fonts
    FontPath /usr/share/cups/fonts:/foo/bar/fonts

### Description

The `FontPath` directive specifies the font path to use when searching for fonts. The default font path is `/usr/share/cups/fonts`.

## Group

### Examples

    Group lp
    Group nobody

### Description

The `Group` directive specifies the UNIX group that filter and CGI programs run as. The default group is system-specific but is usually `lp` or `nobody`.

## CUPS 1.1.15LogFilePerm

### Examples

    LogFilePerm 0644
    LogFilePerm 0600

### Description

The `LogFilePerm` directive specifies the permissions to use when writing log files. The default is 644.

## PageLog

### Examples

    PageLog /var/log/cups/page_log
    PageLog /var/log/cups/page_log-%s
    PageLog syslog

### Description

The `PageLog` directive sets the name of the page log file. If the filename is not absolute then it is assumed to be relative to the `ServerRoot` directory. The default page log file is /var/log/cups/page_log.

The server name can be included in the filename by using `%s` in the name.

The special name "syslog" can be used to send the page information to the system log instead of a plain file.

## Printcap

### Examples

    Printcap
    Printcap /etc/printcap
    Printcap /etc/printers.conf
    Printcap /Library/Preferences/org.cups.printers.plist

### Description

The `Printcap` directive controls whether or not a printcap file is automatically generated and updated with a list of available printers. If specified with no value, then no printcap file will be generated. The default is to generate a file named /Library/Preferences.org.cups.printers.plist on OS X and /etc/printcap on all other operating systems.

When a filename is specified (e.g. /etc/printcap), the printcap file is written whenever a printer is added or removed. The printcap file can then be used by applications that are hardcoded to look at the printcap file for the available printers.

## PrintcapFormat

### Examples

    PrintcapFormat BSD
    PrintcapFormat Solaris
    PrintcapFormat plist

### Description

The `PrintcapFormat` directive controls the output format of the printcap file. The default is to generate the plist format on OS X, the Solaris format on Solaris, and the BSD format on other operating systems.

## CUPS 1.1.3RemoteRoot

### Examples

    RemoteRoot remroot
    RemoteRoot root

### Description

The `RemoteRoot` directive sets the username for unauthenticated root requests from remote hosts. The default username is remroot. Setting `RemoteRoot` to root effectively disables this security mechanism.

## RequestRoot

### Examples

    RequestRoot /var/spool/cups
    RequestRoot /foo/bar/spool/cups

### Description

The `RequestRoot` directive sets the directory for incoming IPP requests and HTML forms. If an absolute path is not provided then it is assumed to be relative to the `ServerRoot` directory. The default request directory is /var/spool/cups.

## ServerBin

### Examples

    ServerBin /usr/lib/cups
    ServerBin /foo/bar/lib/cups

### Description

The `ServerBin` directive sets the directory for server-run executables. If an absolute path is not provided then it is assumed to be relative to the `ServerRoot` directory. The default executable directory is /usr/lib/cups, /usr/lib32/cups, or /usr/libexec/cups depending on the operating system.

## ServerCertificate

### Examples

    ServerCertificate /etc/cups/ssl/server.crt

### Description

The `ServerCertificate` directive specifies the location of the SSL certificate file used by the server when negotiating encrypted connections. The certificate must not be encrypted (password protected) since the scheduler normally runs in the background and will be unable to ask for a password.

The default certificate file is /etc/cups/ssl/server.crt.

## ServerKey

### Examples

    ServerKey /etc/cups/ssl/server.key

### Description

The `ServerKey` directive specifies the location of the SSL private key file used by the server when negotiating encrypted connections.

The default key file is /etc/cups/ssl/server.crt.

## ServerRoot

### Examples

    ServerRoot /etc/cups
    ServerRoot /foo/bar/cups

### Description

The `ServerRoot` directive specifies the absolute path to the server configuration and state files. It is also used to resolve relative paths in the cupsd.conf file. The default server directory is /etc/cups.

## CUPS 1.6.4SyncOnClose

### Examples

    SyncOnClose No
    SyncOnClose Yes

### Description

The `SyncOnClose` directive determines whether the scheduler flushes changes to configuration and state files to disk. The default is `No` which relies on the operating system to schedule a suitable time to write changes to disk.

> Note:

> Setting `SyncOnClose` to `Yes` makes the scheduler use the `fsync(2)` system call to write all changes to disk, however the drive or network file system server may still delay writing data to disk. Do not depend on this functionality to prevent data loss in the event of unexpected hardware failure.

> Enabling `SyncOnClose` may also cause the scheduler to periodically become unresponsive while it waits for changes to be written.

## SystemGroup

### Examples

    SystemGroup lpadmin
    SystemGroup sys
    SystemGroup system
    SystemGroup root
    SystemGroup root lpadmin

### Description

The `SystemGroup` directive specifies the system administration group for `System` authentication. Multiple groups can be listed, separated with spaces. The default group list is `admin` on OS X and `lpadmin`, `root`, `sys`, and/or `system` on other operating systems.

## TempDir

### Examples

    TempDir /var/tmp
    TempDir /foo/bar/tmp

### Description

The `TempDir` directive specifies an absolute path for the directory to use for temporary files. The default directory is /var/spool/cups/tmp.

Temporary directories must be world-writable and should have the "sticky" permission bit enabled so that other users cannot delete filter temporary files. The following commands will create an appropriate temporary directory called /foo/bar/tmp:

    mkdir /foo/bar/tmp
    chmod a+rwxt /foo/bar/tmp

> Note:

> The `TempDir` cannot be pointed at a standard system temporary directory such as /tmp or /var/tmp for security reasons.

## User

### Examples

    User lp
    User guest

### Description

The `User` directive specifies the UNIX user that filter and CGI programs run as. The default user is `_lp`, `lp`, or `nobody` (whichever is found first).

> Note:

> You may not use user `root`, as that would expose the system to unacceptable security risks. The scheduler will automatically choose user `nobody` if you specify a user whose ID is 0.