-2

I made oracle member of a secondary group.

Do I have to restart Oracle before it can write to directories owned by this secondary group?

ujjain
  • 3,963
  • 15
  • 50
  • 88

1 Answers1

7

Assuming a Unix-like Operating System, running processes will not pick up the new secondary group. To pick up the new group membership a new login will be required. If you are starting / stopping Oracle as root via scripts, that is probably sufficient. If you are logged in as the Oracle user, then you will have to log out and back in again.

In general, Unix-like operating systems assign users to groups at login time. You can see this using the id -a command which will show all group membership. Run id -a, then add yourself to additional groups and run id -a again. The new groups will NOT show up. Log out and back in and run id -a and the new groups will show up.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
PK1048
  • 94
  • 1
  • 1
    Why is that so? You do not have to log out. All the running of "usermod -a -G" does is modifies the /etc/group /etc/gshadow. vagrant@localhost ~]$ sudo usermod -a -G users vagrant [vagrant@localhost ~]$ id -a vagrant uid=500(vagrant) gid=500(vagrant) groups=500(vagrant),10(wheel),100(users) I did not have to log out here. – Danila Ladner Jan 07 '14 at 18:20
  • 1
    Oh i am sorry here for misunderstanding. in my test i did referenced that username, hence "id -a vagrant", but if i do "id -a" it by that user it doesn't get that group modification, answer is correct. My apologies. One does indeed has to log off for shell to catch that change. – Danila Ladner Jan 07 '14 at 18:53