group
I've made a group called everyone. It has its own Sub-directory, "/home/everyone". I have 3 users in the group. Do I have to do anything else so everyone can share that Sub-directory? Mandrake 9.2. Thanks in advance. Dave
Signature · 8 lines
Dave Pomeroy K7DNP South Eastern Washington - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 3 lines · dave
I've made a group called everyone. It has its own Sub-directory, "
/home/everyone". I have 3 users in the group. Do I have to do anything else so everyone can share that Sub-directory? Mandrake 9.2.
Most likely you'll have to make sure that the group is accessable to the group everyone (chgrp everyone /home/everyone).
The next step is to make it writeable to "everyone" : chmod 2770 everyone/
The "2" makes sure that all files and directories created in the directory /home/everyone are set to the group everyone (otherwise they would be set to the file-creators group and thus not writeable to other users).
The last step is to change the default umask to 002 instead of 022 so all files will have the permissions set correctly (-rw-rw-r-- instead of -rw-r--r--). If you don't do this, user1 cannot change the files user2 has created.
The default umask can be set in the users profile (/home/user1/.bash_profile) with the line "umask 002".
That should be all!
HTH
--
Jos Lemmerling on Debian GNU/Linux jos(@)lemmerling(.nl)
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 8 lines · On Thu, 25 Dec 2003 [email protected] wrote:
Quoted 3 lines · dave
I've made a group called everyone. It has its own Sub-directory, "
/home/everyone". I have 3 users in the group. Do I have to do anything else so everyone can share that Sub-directory? Mandrake 9.2.Most likely you'll have to make sure that the group is accessable to the group everyone (chgrp everyone
/home/everyone).
oops! typo...
This is what it should be:
Most likely you'll have to make sure that the directory /home/everyone is accessable to the group everyone (chgrp everyone /home/everyone).
Quoted 1 line
The next step is to make it writeable to "everyone" : chmod 2770 everyone/
oops again! :(
"chmod 2770 /home/everyone/" is the correct answer...
Quoted 9 lines
The "2" makes sure that all files and directories created in the directory
/home/everyoneare set to the group everyone (otherwise they would be set to the file-creators group and thus not writeable to other users).The last step is to change the default umask to 002 instead of 022 so all files will have the permissions set correctly (-rw-rw-r-- instead of -rw-r--r--). If you don't do this, user1 cannot change the files user2 has created.
Quoted 6 lines
The default umask can be set in the users profile (
/home/user1/.bash_profile) with the line "umask 002".That should be all!
HTH
I'm going back to sleep now... ;)
--
Jos Lemmerling on Debian GNU/Linux jos(@)lemmerling(.nl)
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoting [email protected]:
Quoted 7 lines
The last step is to change the default umask to 002 instead of 022 so all files will have the permissions set correctly (-rw-rw-r-- instead of -rw-r--r--). If you don't do this, user1 cannot change the files user2 has created.
The default umask can be set in the users profile (
/home/user1/.bash_profile) with the line "umask 002".
Pardon me if I'm confused, but does that mean that any user can change the default umask at will?
Not to mention, this will apply to all of that user's files, not just the ones in /home/everyone/
"Early to bed and early to rise makes a man stupid and blind in the eyes." --Mazer Rakham, from Orson Scott Card's "Ender's Game"
----------------------------------------
This mail sent through www.mywaterloo.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines · Dan Zlotnikov
Quoted 2 lines
The default umask can be set in the users profile (
/home/user1/.bash_profile) with the line "umask 002".Pardon me if I'm confused, but does that mean that any user can change the default umask at will?
Yes, that's correct. It's also possible to change the umask of all users in /etc/profile . I just checked the possibility to apply a umask to a single directory, but it doesn't seem to be possible (at least not on a ext2/3 filesystem.
I came accross another option in the man-page:
If the directory /home/everyone is mounted on a seperate partition, the option "grpid" can be used to avoid the use of the SST-bits.
Quoted 2 lines
Not to mention, this will apply to all of that user's files, not just the ones in
/home/everyone/
Should that be a problem then? On my (Debian) systems the default group on newly created files is the group of the user itself, so that doesn't make any difference. Obviously it's another story when the default group isn't its own usergroup.
What other option do you recommend then?
grtz
--
Jos Lemmerling on Debian GNU/Linux jos(@)lemmerling(.nl)
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
(disclaimer: If it sounds like I'm explaining things to a five-year-old, that's because I'm lost, not because I think you are)
Quoting Jos Lemmerling <[email protected]>:
Quoted 5 lines · Dan Zlotnikov
Quoted 4 lines
Quoted 3 lines
The default umask can be set in the users profile (
/home/user1/.bash_profile) with the line "umask 002".
Quoted 8 lines
Quoted 3 lines
Pardon me if I'm confused, but does that mean that any user can change the
default umask at will?
Yes, that's correct. It's also possible to change the umask of all users in
/etc/profile. I just checked the possibility to apply a umask to a single directory, but it doesn't seem to be possible (at least not on a ext2/3 filesystem.
That's a tad unfortunate. The problem I'm having is as follows:
foo@alpha: vim Foo (write some text)
I didn't want to bother with new groups, so...
foo@alpha: chmod 777 Foo
foo@alpha: su bar
bar@alpha: vim /home/foo/Foo
Which works just fine, as expected.
umask 002 will set 775 on *all* of that user's files, not just the ones in /home/everyone/
Quoted 3 lines
I came accross another option in the man-page:
If the directory/home/everyoneis mounted on a seperate partition, the option "grpid" can be used to avoid the use of the SST-bits.
Now *that* is elegant. Hell, I'd move the directory to a different partition, just so I could use this :)
Quoted 8 lines
Quoted 1 line
Not to mention, this will apply to all of that user's files, not just the
ones
Quoted 1 line
in
/home/everyone/Should that be a problem then? On my (Debian) systems the default group on newly created files is the group of the user itself, so that doesn't make any difference. Obviously it's another story when the default group isn't its own usergroup.
Ah. Point. So does that mean the user would still have to manually change the group of every file in /home/everyone/ to "everyone"?
Quoted 2 lines
What other option do you recommend then?
A login script that would sudo everything in /home/everyone/ to 775 whenever one of the users in said group logged in. Would that create problems with temporarily locked files, though?
Dan
----------------------------------------
This mail sent through www.mywaterloo.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 2 lines · Dan Zlotnikov
(disclaimer: If it sounds like I'm explaining things to a five-year-old, that's because I'm lost, not because I think you are)
LOL
No, I'm seven years young... ;)
Quoted 12 lines
Quoted 4 lines
Yes, that's correct. It's also possible to change the umask of all users in
/etc/profile. I just checked the possibility to apply a umask to a single directory, but it doesn't seem to be possible (at least not on a ext2/3 filesystem).That's a tad unfortunate. The problem I'm having is as follows:
foo@alpha: vim Foo (write some text)
I didn't want to bother with new groups, so...
foo@alpha: chmod 777 Foo
Quoted 7 lines
foo@alpha: su bar
bar@alpha: vim/home/foo/FooWhich works just fine, as expected.
umask 002 will set 775 on *all* of that user's files, not just the ones in
/home/everyone/
Only the newly created files.
If you have a problem like above, why not use:
"su -c 'vim /home/foo/Foo' foo" as user bar? Saves a lot of typing!
Quoted 6 lines
I came accross another option in the man-page:
Quoted 2 lines
If the directory
/home/everyoneis mounted on a seperate partition, the option "grpid" can be used to avoid the use of the SST-bits.Now *that* is elegant. Hell, I'd move the directory to a different partition, just so I could use this :)
Common.. it ain't that much work! ;)
Quoted 7 lines
Quoted 4 lines
Should that be a problem then? On my (Debian) systems the default group on newly created files is the group of the user itself, so that doesn't make any difference. Obviously it's another story when the default group isn't its own usergroup.
Ah. Point. So does that mean the user would still have to manually change the group of every file in
/home/everyone/to "everyone"?
If you're not using the s-bit, yes. Or... if you umask 000 there will be no problem reading and writing files without changing the group to everyone, but that's kind of unsecure to do... ;)
Quoted 5 lines
Quoted 1 line
What other option do you recommend then?
A login script that would sudo everything in
/home/everyone/to 775 whenever one of the users in said group logged in. Would that create problems with temporarily locked files, though?
Sudo everything in /home/everyone?? IIRC sudo allows the user to *execute* a certain command as another user... It has nothing to do with adjusting file-access itself; of course you can do a "sudo ls" and a "sudo vim" etc. etc. but that's a lot of work and typing... :)
And you could ask yourself why the users do have seperate logins and not just one login for all of them...
But if someone knows a way to automagicly set the default permissions on files in a directory (just like the s-bit for groups does) and *not* using the umask-thingy, I would like to know! (and not while using samba or an FTP-daemon, they have their own options for this)
grtz
--
Jos Lemmerling on Debian GNU/Linux jos(@)lemmerling(.nl)
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs