I have 2 users
user2 in my Ubuntu PC.
user1 was the one I created during installation. I created
user2 to execute a python program. Now, this program is present in the path
user2 is executing a program located in the home directory of
user1. During the execution, I'm unable to create files inside the output directory
/home/user1/programs/Output/. So, I went ahead to check the permissions and found the following:
$ ls -l /home/user1/programs/ drwxrwxr-x 10 user1 user1 4096 Sep 6 11:30 Output drwxrwxr-x 2 user1 user1 4096 Sep 5 17:50 source $ cd Output $ mkdir dummy1 $ ls -l drwxrwxr-x 2 user1 user1 4096 Sep 6 11:30 dummy1 $ cd dummy1 $ vi a.txt $ ls -l -rw-rw-r-- 1 user1 user1 7 Sep 6 11:31 a.txt $ cd .. $ sudo mkdir dummy2 $ ls -l drwxr-xr-x 2 root root 4096 Sep 6 12:37 dummy2
It's clear that other users like
user2 don't have
write permissions within the
home directory of
Now, I want to add the users
user2 into the same group with same permissions so that
user2 can get a
rwx (7)? How to create such a group?