I'm running Ubuntu 5.04 and I'm probably missing something obvious. I have added a user (call it user 2) and want this user to be part of my group so we can share common interest work files. I have:
home/odyssey
and
home/user2
so it appears to me that user2 is not in my group. No?
When user2 signs in, they cannot see the folder on my desktop that we both need to be able to access and I want it to show on the desktop of user2. Try as I might I cannot "re-assign" user2 to my group.
Ubuntu is the only distro I have tried to do anything with, so groups maybe are not something that is common to all distros?
What should I do? TIA
What you need to do is ensure that both users are in the same group that you will share under, then you need to have the directory available for write permissions.
Here is a simple example:
Code:
# ls -d ~user1
drwxr-x--- 6 user1 users 8192 Aug 14 21:00 /home/user1
# ls -ld ~user2
drwxr-xr-x 6 user2 users 4096 Aug 14 21:00 /home/user2
This shows us both user1 and user2 are in the default group "users".
Code:
# mkdir /home/user-share
# chown root:users /home/user-share
# chmod 770 /home/user-share
Now the directory has been made both users can access and write files into that directory. They of course need to make sure that the files they make have the permissions to allow other users to then edit them.
Here is an example showing how to make a group for the users:
Code:
# groupadd users
# gpasswd -a user1 users
# gpasswd -a user2 users
This makes a new group called "users" and adds both user1 and user2 to the group. Again you can make the new share directory and continue from there.
A user should always make sure that they make files with valid permissions for other users .. for instance:
Code:
# cd /home/usershare
# touch file
# ls -l file
-rw------- 1 user1 user1 0 Aug 14 21:30 file
You can see the default file made by this user doesn't give the permissions needed. Therefore:
Code:
# chgrp users file
# chmod 660 file
That would give the permissions needed. Unfortunately its a tough job managing permissions but hopefully you will grow to get used to it.
Thanks and good luck! :)
Wow, what a great reply! I think I understand some of it and by the time I work my way through it, doubtless will understand it better.
Currently I am the sysadm (aren't we in trouble?) and user 2 is one of my employees. By way of clearing the fog, does this leave each of us with our own "private" areas or rather will be both be in the same pot for all files?
Quote:.. does this leave each of us with our own "private" areas or rather will be both be in the same pot for all files?
Indeed, the shared space will be
/home/user-share and whilst that is open to the group that you make, the home space
/home/user? is still personal and does not require to be opened up to let this work.
[img]<___base_url___>/uploads/emoticons/default_laugh.png[/img] thanks!