Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

As suggested above, you can add newgrp <group> to SFTP server option (for SFTP) or Shell (for SCP).
Tomas

This issue happens, because newgrp opens a new shell.

The only way around this which we found, was to save public key with newgrp command prefix in .ssh/authorized_keys2:
cat >> .ssh/authorized_keys2 <<_EOF
command="newgrp <group>" ssh-dss AAAA ...
_EOF
and use key for authentication. This way, winscp opens directly the new shell. But of course, you need to have one key per group.
martin

Re: Set effective/primary group of login?

What protocol are you using?
This FAQ (though rather unrelated) might give you some idea how to alter the environment on remote server:
https://winscp.net/eng/docs/faq_su
oblique77

Set effective/primary group of login?

Hi,

Compliments on a fantastic piece of software that's made a huge difference to a lot of people.

Apologies if I've missed this elsewhere, but is it possible to set the effective group of the user when logging in (or after?) - the equivalent of "newgrp" in a shell? Have tried to do this as a custom command from winscp, but it forces a loss of connection from the server.

I know this is a little unusual - I am using a server (server A) that is trying to access files from another server (B) via NFS which files protected by ACLs. It is the ACL that allows access to the files, rather than the standard user/group permissions. On a local shell on server A, the newgrp command is apparently needed to access the files.

many thanks for any advice!