I have logged in as "userc". I need access to all the files that "usera" has. I have edited the following file,
vi /etc/group
usera:x:1000:userb,userc
But this does not seem to work. I am still getting "permission denied" error. If I su to usera then I am able to access those files.
What is the best way to have equivalent access to "root" or "usera"?
Update: I have tried the options suggested in the answer but I am still getting the following:
[root@app company]# cd /opt/company/
[root@app company]# chmod 777 emboss/
[root@app company]# su shantanu
[shantanu@app company]$ whoami
shantanu
[shantanu@app company]$ echo "test" > /opt/company/emboss/todel.txt
bash: /opt/company/emboss/todel.txt: Permission denied
[shantanu@app company]$ sudo echo "test" > /opt/company/emboss/todel.txt
bash: /opt/company/emboss/todel.txt: Permission denied
[shantanu@app company]$ sudo -u usera echo "test" > /opt/company/emboss/todel.txt
bash: /opt/company/emboss/todel.txt: Permission denied