desouzarod
New Member
Hi TuxBot,
I'm completing a challenge on Linux server administration, and I was asked to create a directory inside of /var directory. Set permissions to user and group as rwx, and other to ---
Also need to set a particular user as owner of the directory, and add this same user to a specific group.
I did it using the following;
sudo mkdir -m 770 <groupname>
then;
sudo chown <username> <groupname>
then;
sudo usermod -g <groupname> <username>
Is there a syntax that will do all these, as one line of code?
Many thanks
I'm completing a challenge on Linux server administration, and I was asked to create a directory inside of /var directory. Set permissions to user and group as rwx, and other to ---
Also need to set a particular user as owner of the directory, and add this same user to a specific group.
I did it using the following;
sudo mkdir -m 770 <groupname>
then;
sudo chown <username> <groupname>
then;
sudo usermod -g <groupname> <username>
Is there a syntax that will do all these, as one line of code?
Many thanks