LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-07-2004, 08:18 PM   #1
super-momo
LQ Newbie
 
Registered: Jun 2004
Location: Toronto
Distribution: Debian
Posts: 17

Rep: Reputation: 0
umask for a user


I want to set umask so no one else can read my files. I have `umask 077` in .bashrc, .bash_profile, and .profile. I use gnome2 and gdm. When I create files under gnome-terminal, the permissions are set properly. But when I save files from somewhere else, say GIMP, group and other have read permission again. I suspect that I should put `umask 077` in init script for gdm, but I don't know what it is. .xinitrc and .xsession doesn't seem to work.

And also, is it possible to set umask for an individual directory? I want my public_html to have umask 022 so others can access my files and I don't have to chmod everytime I create a file.

Thanks in Advance.

rxc
 
Old 06-24-2004, 06:43 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
How about just running "chmod o-rx ~", so that others have no acces to your home directory?
 
Old 06-26-2004, 06:34 AM   #3
sachin_keluskar
LQ Newbie
 
Registered: Apr 2004
Posts: 20

Rep: Reputation: 0
Hi

if you want to set a umask change the umask in /etc/bashrc file as per your requirment

Last edited by sachin_keluskar; 06-26-2004 at 06:39 AM.
 
Old 06-26-2004, 11:36 PM   #4
super-momo
LQ Newbie
 
Registered: Jun 2004
Location: Toronto
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Hi! yea.. chmod would do the job, but temporary only.

And by modifying /etc/bashrc, I think the permission will still be set incorrectly in non-terminal applications. For example, if I saved a file in GIMP, then the permission would still be rwxr--r--. Tell me if I am wrong.

Thanks!
 
Old 06-26-2004, 11:39 PM   #5
super-momo
LQ Newbie
 
Registered: Jun 2004
Location: Toronto
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by ToniT
How about just running "chmod o-rx ~", so that others have no acces to your home directory?
ohh.. you meant the home directory. yea.. but i still want some files in it to be accessible by chmodding. If i chmod o-rx ~, I block my entire home dir from the outside world!
 
Old 06-27-2004, 01:15 PM   #6
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Well, there is one umask setup in the /etc/login.defs. If that is not working, you can also try creating a ~/.gnomerc that contains a line umask 077.

For different umasks on different directories, you can try OnDir, if it suits your needs.
 
  


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
Umask Randvegeta Linux - Software 3 11-27-2009 07:52 AM
Set umask for user in KDE jferrando Linux - Security 2 01-12-2005 10:41 AM
umask trophy Linux - General 1 04-03-2004 01:17 AM
Umask def1014 Linux - Security 3 06-21-2002 04:05 AM
different umask for different user macgyver Linux - Security 6 04-17-2002 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:51 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