Jump to content

File Sharing between User Accounts [solved]


menendez
 Share

Recommended Posts

I feel stupid that I have not been able to figure out file sharing between User Accounts in a single Linux box. All my searches lead to the topic of file sharing over LAN. I am trying to set up a user account for my children for which my user account will have full permissions and access. I have set up two user accounts that I will refer to as PARENT and CHILD. I made PARENT and member of the CHILD User Group. As CHILD, I set all the permissions to be Read & Modify for the User Group. Apparently this wasn't enough because when I am in Konqueror as PARENT the CHILD folders are still locked. I noticed that if I check the properties of a user's home folder as a user all I see are the "General", "Permissions" and "Meta Info" tabs. But if I check the permissions as root then I also see "Share" and "Sharing" tabs. The "Sharing" tab implies sharing over the web so I ignored this. The "Share" tab has a "Configure File Sharing" button. Nothing happens when this is selected and the message is "You need to be authorized to share folders". One would think root would be. I went into the Mandriva Control Center and added CHILD as a Samba user. This didn't help either.

 

Suggestions?

 

Thanks, Jose

 

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

Hi

 

Open konsole, and log as root with the su command.

Change directory to home

cd /home

 

Now type

chmod -R 0777 NAME_ON_THE_DIRECTORY

 

And the name on the directory has to be written exactly as it is in the user account.

 

Or you can do it as root in konqueror.

1. Press ALT+F2, write kdesu konqueror and your root password when promt.

2. Find the account directory,

3. Right click choose properties and find permissions

 

Hpoe this helps you, if not just ask again.

Link to comment
Share on other sites

If you only have two types of user on your system, then you can do what orts suggests. This gives full read/write access to anybody in the system to that particular directory where parent/child will save files to. However, if you have other users they will also be able to modify and save files here, since they have world writable.

Link to comment
Share on other sites

Ian has a point there.

 

So I have tried to add some accounts on my own computer.

 

What you have to do, to make it right (I hope)

But this little guide depends on, that every user has his/her own Group

 

1. Fire up MCC

2. Find System -> Manage Users

3. Click on the Users tab

4. Mark your own user and click Edit

5. In the new window click on the Groups tab

6. Choose which Groups your own user, has to be a member of.

 

Now your user are a member of the new group, but you still don't have any write access, to get this the fastest way, open konsole, and log in as root with the su command, and typr your root password when promted.

Now write:

chmod -R 0774 /home/NAME_ON_DIRECTORY

Now every member of the group should have write access, and every one els can see whats in the the directory.

Link to comment
Share on other sites

The standard Unix way of solving this issue is:

- choose the group for the place you want to share,

- make sure all is part of this group in this place,

- make sure all users who must have rw access to this place are in this group,

- chmod -R g+rwX this place, and +s for folders on the group and optionnaly on the user too,

- make sure all users in the group have an umask 007 or more permissive, but no less.

 

Example. Suppose you have user "child" in group "child", and user "parent" in group "parent" and also in group "child"; let's assume it is "child"'s home directory you want to give access to, to all users of group "child" (this is what I understand of your situation):

# cd ~child
# echo 'umask 007' >>.bashrc
# chown -R child.child .
# chmod -R g+rwX .
# find . -type d -exec chmod ug+s '{}' \;
# cd ~parent
# echo 'umask 007' >>.bashrc
# chown parent.parent .bashrc

 

Some programs don't follow the umask, though (bad of them), so you'll have to repeat the chown/chmod on ~child regularly (for example with cron) for better results. In this case, given the directory you share is a home directory, you may have to change msec rules too, because msec by default will regularly revert access rights to home-directories.

 

Yves.

Link to comment
Share on other sites

Thanks everyone for the responses.

I have things set up the way I want now.

One extra thing I did learn though was that after changing the permissions I had to logout of my session and log back in before I saw the "Child" folders as unlocked in Konqueror from the "Parent" user account.

 

Thanks again,

Jose

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...