Create a Helix Core Server root directory

This topic assumes that you have download the p4 and p4d binaries and have made p4 and p4d executable.

The Perforce service stores all user-submitted files and system-generated metadata in files and subdirectories beneath its own root directory. This directory is called the server root.

To specify a server root, either set the environment variable P4ROOT to point to the server root, or use the -r server_root flag when invoking p4d.

Note

p4d is the only process that uses the P4ROOT variable. Helix Core client applications never use the P4ROOT directory or environment variable.

Because all Helix Core Server files are stored by default beneath the server root, the contents of the server root can grow over time. See Disk space allocation for information about disk space requirements.

Do not run p4d as root

The Perforce service requires no privileged access. Do NOT run p4d as root or any other privileged user. See Run the Helix Core Server (p4d) as an unprivileged user.

The server root can be located anywhere, but the account that runs p4d must have read, write, and execute permissions on the server root and all directories beneath it. For security purposes, set the umask(1) file-creation-mode mask of the account that runs p4d to a value that denies other users access to the server root directory.