LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-19-2008, 07:04 AM   #1
WorkingClassHero
LQ Newbie
 
Registered: Nov 2007
Posts: 10

Rep: Reputation: 0
Set default umask for ssh as non-root


I want to log onto another computer with ssh. There I want to have umask 077. I do not have root permission. For my bash it is possible to set umask 077 into the .bashrc file in my home directory (, as non-root). Can I change the default umask for ssh logins aswell as non root? Which file do I have to edit in which way to do this?
Thanks in advance!
 
Old 02-19-2008, 07:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ssh has nothing to do with this, it's the account which has umask details and ssh is only one of many ways to access those accounts. why would you want different access rights from a remote connection compared to sitting infront of the machine? you should actualy use .bash_profile, not .bashrc for that, and if you do you'll see it covers all bash logins.

Last edited by acid_kewpie; 02-19-2008 at 07:44 AM.
 
Old 02-19-2008, 10:09 AM   #3
WorkingClassHero
LQ Newbie
 
Registered: Nov 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Putting that into .bash_profile worked :-)
thx
 
  


Reply



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
File permissions and default umask bnbguy Linux - Newbie 1 06-25-2007 10:14 AM
How to set umask DrRobin22 Linux - General 3 09-13-2006 04:46 PM
How to set user's root directory in SSH? nyy Linux - Software 2 08-24-2004 06:07 AM
can you set a default umask for only certain directories? BrianK Linux - General 3 06-14-2004 09:02 PM
Where to set default file permissions (umask)? tredegar Linux - Newbie 14 01-27-2004 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:35 AM.

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