A read-only configuration parameter reporting the data directory permissions

data_directory_mode is a preset configuration parameter reporting the permissions of the data directory defined by the data_directory parameter at startup.

data_directory_mode was added in PostgreSQL 11.

Default value

The default value for data_directory_mode is: 0700.

Note that as a preset configuration parameter, data_directory_mode does not have a default value per-se. It can however be implicitly set when initialising a data directory with initdb using the option -g/--allow-group-access, or by manually setting the data directory permissions to one of:

  • 0700 (drwx------)
  • 0750 (drwxr-x---)

before (re)starting PostgreSQL. Other combinations of permission settings are not permitted.

Change history


Data directory, GUC configuration item, Preset configuration item

See also

initdb, data_directory, log_file_mode