[ale] Addendum to SFTP umask

Michael E. Barker mbarker68 at comcast.net
Mon Jun 23 14:48:32 EDT 2003


Michael E. Barker wrote:

> I have set my umask in everything from /etc/profile to .profile, 
> .bash_login and .bash_profile.  Ssh shell login sets the umask 
> correctly but  sftp wont.  ssh2d is on linux with a windows client 
> (which shouldn't matter).  Does anyone have experience with this?
>
Knowledge base article 366 on support.ssh.com states:
    The default file attributes for created files are defined in the 
shell initialisation files with umask on the server side. The 
definitions need to be made in a shell    
    initialisation file that is read /even in/ a non-interactive login. 
Note that scp2 and sftp2 always use the shell on the remote side 
non-interactively. Correct initialisation     file and the location 
varies depending on the shell used on the server-side.

    For example, when using zsh, the umask definition should be added to 
either /etc/zshenv or $HOME/.zshenv files because they are read on every 
invocation of the     shell. Note that zsh /etc/zshrc is read only for 
interactive shells and thus in this case is not useful.

    Please refer to your shell's documentation for further information.

man bash states:
    When bash is invoked as an interactive login shell, or as  a
     non-interactive  shell  with  the  --login  option, it first
     reads and executes commands from the file  /etc/profile,  if
     that  file  exists.   After  reading that file, it looks for
     ~/.bash_profile,  ~/.bash_login,  and  ~/.profile,  in  that
     order,  and  reads  and executes commands from the first one
     that exists and is readable.

Am I missing something?  Is there another place I should set umask 
(server side).  Correction ssh2d is on sun box solaris 8.

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list