1

I want o create a user group that has permissions to create/edit/view nginx configs without sudo permissions, but I heve no idea how.

Creating a normal user group and setting owner:group to same-owner:configurator-group for the nginx configs location, the user can edit and view but creating a file sets the new file owner and group to the users.

1 Answers1

0

This - provides an overview of managing user groups and file permissions on an Ubuntu system.

Create the user group using the groupadd command:

sudo groupadd configurator

Add the users who should be members of the configurator group using the usermod command:

sudo usermod -a -G configurator [username]

Change the ownership and permissions of the Nginx configuration files to allow the configurator group to read and write to the files:

sudo chown root:configurator /etc/nginx/conf.d/*
sudo chmod 640 /etc/nginx/conf.d/*

you may want to prevent members of the configurator group from creating new files in the /etc/nginx/conf.d directory. To do this, you can set the sticky bit on the directory:

sudo chmod +t /etc/nginx/conf.d
hakim00
  • 16
  • 1