If I run id -a
on my remote host it shows a different set of groups if I run ssh [remote_host] "id -a"
. I would expect both to return the same set of groups as I am the same user in both cases.
I am trying to run a chgrp
command using ssh to change the group of a directory of files. However, it appears my user is not in the group I am trying to change to, so I don't have permissions. If I ssh into my server I am in the group and am able to run chgrp
successfully.
Why would my group ownership change depending on if I am running the command over ssh?
remote@website:~$ id -a
uid=1000(remote) gid=1000(remote) groups=1000(remote),33(www-data)
local@computer:~$ ssh remote@website "id -a"
uid=1000(remote) gid=1000(remote) groups=1000(remote)