I need to change gid so that I can successfully execute a fusermount command (it's indirectly via encfs). If I don't do "newgroup fuse" then the mount fails with a permission denied error.
However I want to wrap this up in a script and, as I have discovered when trying to do it, when you execute newgrp you get a new shell so the script that is running newgrp only continues when you exit from the newly created shell. While it may be inherently necessary for newgrp to execute a new shell I wish the man page had told me as it was rather confusing initially.
So, how do I automate changing GID? All I actually want to do is:-
newgrp fuse encfs /<encrypted directory> /<unencrypted mount>
On Wed, Mar 12, 2008 at 11:38:17AM +0000, Chris G wrote:
I need to change gid so that I can successfully execute a fusermount command (it's indirectly via encfs). If I don't do "newgroup fuse" then the mount fails with a permission denied error.
However I want to wrap this up in a script and, as I have discovered when trying to do it, when you execute newgrp you get a new shell so the script that is running newgrp only continues when you exit from the newly created shell. While it may be inherently necessary for newgrp to execute a new shell I wish the man page had told me as it was rather confusing initially.
So, how do I automate changing GID? All I actually want to do is:-
newgrp fuse encfs /<encrypted directory> /<unencrypted mount>
I can answer my own question. Having added myself to the fuse group I don't need to do a 'newgrp fuse' as long as I log out and log back in again before running encfs. It's only when trying to run encfs in the same session as the usermod command adding me to the fuse group that problems occur.