LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2004, 01:27 PM   #1
physio_cs
LQ Newbie
 
Registered: Jun 2004
Location: MA
Distribution: Mandrake and Red Hat
Posts: 3

Rep: Reputation: 0
Permissions


Say I'm logged in as user 'foo' and I create a file, the permissions assigned will be:

-rw-r--r-- 1 foo foo

How can I modify user foo so that files created get these permissions?

-rw-rw-r--



Thank you
 
Old 06-10-2004, 01:41 PM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Take a look at the "umask" command.

http://www.sun.com/bigadmin/content/...s.html?biga=15
 
Old 06-10-2004, 03:10 PM   #3
physio_cs
LQ Newbie
 
Registered: Jun 2004
Location: MA
Distribution: Mandrake and Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
I've found postings that suggest either I should include 'umask 022' in the users /home/foo/.bashrc file or to make the change globally that I could add the line 'umask 022' after the if/then lines refering to umask in the /etc/bachrc file.

Neither one worked.
 
Old 06-10-2004, 03:35 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You don't want a umask of 022. That will get you where you started (rw-r--r--). Read the documentation for umask (either man umask or man bash; depending on how your system has its man pages set up).

You want to change umask to 002. The documentation will explain why that is.
 
Old 06-10-2004, 03:36 PM   #5
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Did you log out and then log back in? The .bashrc file is not reloaded automatically after a change. You can reload it (without logging out) by doing...

source /home/foo/.bashrc
 
Old 06-10-2004, 03:49 PM   #6
physio_cs
LQ Newbie
 
Registered: Jun 2004
Location: MA
Distribution: Mandrake and Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you very much Dark_Helmet and Donboy. I did not look closely enough to the umask mode and was indeed using the wrong mode.
 
  


Reply


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 05:16 AM
Permissions jymmi Linux - Newbie 3 04-15-2005 12:43 AM
Permissions help reddog64 Linux - Newbie 1 04-22-2004 06:23 PM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 01:52 PM


All times are GMT -5. The time now is 01:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration