Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Unix

Journal jeffy124's Journal: short unix question... 1

When I log into a unix box, any new files I create are set to rw-r--r-- permissions, which i can change to rw-rw-r-- by using umask in my .bashrc file.

The group assigned to that created file is the same as my username, and I'm the only user in that group. I'd like to have the default group to be something else, as right now I have to constantly do chgrp's on new files, a real pain, especially when I forget to do so and lock my co-workers out of files.

How do I change the default working group assigned to a file when I create it? I'd prefer something that can be done at logon, as I noticed 'newgrp' launches a new shell, meaning I cant put it in .bashrc (causes infinite loop). Suggestions?

This discussion has been archived. No new comments can be posted.

short unix question...

Comments Filter:
  • In /etc/group (Score:3, Informative)

    by forged ( 206127 ) on Friday February 14, 2003 @10:54AM (#5301729) Homepage Journal
    Modify your group in /etc/group to the group number that you would like to be using as primary. It makes no sense to have a separage group for each user..

    I have group 100 for 'users' and set all my local users accounts in this group. This way, co-users of the machine can use the files between them if they want to. This is probably what you have to do. Remember to adjust all directories (esp. /home) to the new group(s) when you change things around, or you might find yourself unable to write in your own homedir !

    If you need to be in more than one groups, add your username at the end of a group name in /etc/group, eg.

    wheel:x:10:username

People who go to conferences are the ones who shouldn't.

Working...