Assume I'm logged in with user takpar:takpar@skyspace:/$As root, I've added takpar as a member of group webdev using:# usermod -a -G webdev takparBut it seems it has not been applied. because for example I can't get into a webdev's directory that has read permission for group:400169 drwxr-x--- 3 webdev webdev 4.0K 2011-08-15 22:34 public_htmltakpar@skyspace:/home/webdev/$ cd public_html/bash: cd: public_html/: Permission deniedBut after a reboot I have access as I expect. As this kind of group changing is in my routine, is there any way to apply changes without needing a reboot?AnswerIt seems there is no way to make the current session know the new group, for example the file manager won't work with new changes. But a re-login will do the job.The su command is also appropriate for temp commands in urrent session.
How to apply changes of newly added user groups without needing to reboot?
permissions;users;group
Local solution: use su yourself to login again. In the new session you'll be considered as a member of the group.Man pages for newgrp and sg might also be of interest to change your current group id (and login into a new group):To use webdev's group id (and privileges) in your current shell use: newgrp webdevTo start a command with some group id (and keep current privileges in your shell) use: sg webdev -c command(sg is like su but for groups, and it should work without the group password if you are listed as a member of the group in the system's data)