On Mon, Jun 11, 2018 at 10:44 PM Alfredo De Luca <[hidden email]> wrote:
I need to run a simple script ... basically a chmod... when each sftp user log in into a sftp server.
I tried /etc/profile.d/ etc etc but nothing is working.
Unfortunately, I don't have time to dig in right now, but what you're looking to do MIGHT be possible with the ~/.ssh/config file by way of the LocalCommand directive (see the ssh_config manpage for more). Be sure to take note of the fact that this needs to be enabled server-side by the PermitLocalCommand directive. I know that this would work for SSH; I'm unsure about SCP, but it's as close to an (easy/elegant) solution as I can think.