Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-29-2008, 02:22 PM   #1
Registered: Apr 2008
Location: Orlando, Fl
Posts: 52

Rep: Reputation: 15
Setting umask for incoming sftp users

We have users that send files to our server via sftp... We normallyhave umask set to 022 but for these files we would like to force a umask of 002...

I've tried to change in the .bash_profile but does not seem to make any difference...

Is there a way to change this???
Old 12-29-2008, 03:15 PM   #2
Registered: Apr 2008
Location: Orlando, Fl
Posts: 52

Original Poster
Rep: Reputation: 15
What I found is that according to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.

[ftpuser ~]$ cat ./.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc

# User specific aliases and functions

umask 0002



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to queue incoming sftp connections? erktrek Linux - Server 4 11-10-2006 02:06 PM
setting setting umask for apache user help mickyman Linux - General 0 05-08-2006 04:37 AM
setting umask for all users and all sorts of logins sterrenkijker Debian 3 01-01-2006 05:19 AM
umask setting Cort Linux - Newbie 2 09-28-2004 12:18 PM
umask setting?? TheRealDeal Linux - General 4 01-03-2004 02:45 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration