Artificial intelligent assistant

Does ~/.bashrc set environment for users whose shell is /sbin/nologin? I have an SFTP server and have set user shells to nologin to restrict access to SFTP. I want to set a conditional umask of 0002 so that newly created files are group writable for all SFTP users. Can I put this code in their bashrc to ensure that all newly created files are group writable or is there a better method? Red Hat 5/6 Linux. NFS3 filesystem

As @terdon stated in his comment, `.bashrc` is relevant only for users using `bash`. This is because the file is sourced when `bash` is launched.

To achieve what you want to do, the easiest solution is to add the option `-u` to the line that reads something like

`Subsystem sftp /usr/lib64/misc/sftp-server`

in `/etc/ssh/sshd_config`. For example :

`Subsystem sftp /usr/lib64/misc/sftp-server -u 0002`

See `man 8 sftp-server` for details.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 57c6dd8c8732eba432bd00821508f6a6