TMAegis
Другие правила для db2

TMA-DB2-3.1.2

Secure Permissions for Default Database File Path (DFTDBPATH)

СреднийУровень 1Автоматическаяdb2

Описание

The DFTDBPATH parameter contains the default file path used to create Db2 databases. It is recommended that the permissions for this directory be set to full access for Db2 administrators and read and execute access only for all other accounts. It is also recommended that this directory be owned by the Db2 Administrator. Automated as: the DFTDBPATH directory is not group- or world-writable (755 or stricter); verify ownership by the Db2 administrator separately. Run as the instance owner (or with sqllib/db2profile sourced) so the db2 CLP reads this instance's configuration.

Как проверяется

Метод проверки: Команда оболочки

shell
out=$(db2 get dbm cfg 2>/dev/null) || exit 1; p=$(printf '%s\n' "$out" | sed -n 's/.*(DFTDBPATH) *= *//p' | sed 's/[[:space:]]*$//'); [ -n "$p" ] || { echo compliant; exit 0; }; [ -e "$p" ] || { echo "noncompliant: $p does not exist"; exit 0; }; w=$(find "$p" -prune \( -perm -020 -o -perm -002 \) -print); [ -z "$w" ] && echo compliant || echo "noncompliant: $p is group/world writable"
Ожидаемый вывод
compliant

Как исправляется

Метод исправления: Рекомендация или патч инфраструктуры

For Windows and Linux: 1. Attach to the Db2 instance. db2 => attach to <db2instance> 2. Run the following command to change the default file path, if necessary: db2 => update database manager configuration using dftdbpath <valid directory> Additional steps for Windows: 1. Connect to the Db2 host 2. Right-click over the directory used as the default file path 3. Choose Properties 4. Select the Security tab 5. Assign ownership of the directory to the Db2 Administrator 6. Grant all Db2 administrator accounts the Full Control authority 7. Grant only read and execute privileges to all other users (revoke all other privileges) Additional steps for Linux: 1. Connect to the Db2 host 2. Change to the directory used as the default file path 3. Assign the Db2 Administrator to be the owner of the directory using the chown command 4. Change the permissions for the directory $ chmod -R 755

Свойства

Операционные системы
Любая
Теги
db2databasefilesystem
Источник
CIS IBM Db2 12.1 Benchmark v1.0.0 - 3.1.2 Secure Permissions for Default Database File Path (DFTDBPATH)

Проверить этот хост

Выполните команду на компьютере, аудит которого вам разрешён. Сканирование работает только на чтение.

shell
tmaegis scan --target db2