I need to test linux group permissions on a repository. In one shell, how can I temporarily remove one of my group associations?
If my groups are defined as:
% groups foo bar baz
How can I make it so it only returns
foo bar without
It IS possible.
Check out this code (valid C89, heh) I wrote in 25 mins. Usage example:
WARNING THIS CODE IS SUID!
While it drops privileges as you see on id's output, it MAY BE DANGEROUS. Dixi.
I think that this is not possible, since files (and POSIX ACLs) can specify subtractive rights for certain groups. Allowing people to escape from a group would then be a security hole.
Of course if you have root access, you could simply remove yourself from the group and do