Create directory with defined ownership and permissions using a simple single-step command.

Create /run/nginx directory owned by nginx, group nginx, and permissions set to 0750.

$ install --directory --mode 0750 --owner nginx --group nginx /run/nginx

install utility (copy files and set attributes) is a part of the coreutils package.

$ dpkg-query -S /usr/bin/install
coreutils: /usr/bin/install

Inspect manual page for more information.

$ man install