34

I and my brother have User Accounts on this machine. I want to share the Documents directory with him.

Is there a STRAIGHTFORWARD way to do it?

I am not a power user so I am looking for a way to do this using nautilus, rather than a script or a way that requires creating symlinks.

I can download an application if i have to.

Last time I wanted to do this I just copied the contents to /home for both of us to use.

Something I can do in System Settings would be appreciated

5
  • 1
    Once you created the shared directory with the right permission, you can just access by smb://127.0.0.1
    – Achu
    May 6, 2013 at 14:01
  • Is "Documents Director" the name of the folder or is Director the name of the folder that resides in your Documents folder? Why no symlink creation? It can be done by drag and drop.
    – user68186
    May 6, 2013 at 14:14
  • why is that you do not want an easy way to do that ....
    – Qasim
    May 6, 2013 at 15:22
  • maybe i put the question in a wrong way.. but i want an easy way out.. methods already available give out scripts to achieve this.
    – ArunMKumar
    May 6, 2013 at 17:36
  • @Achu i tried you method.. i get an error saying "unable to mount location, failed to mount windows share". am i missing something really obvious?
    – ArunMKumar
    May 6, 2013 at 17:38

3 Answers 3

19

There are three steps to this process

Step One: Make your brother a member of your group.

Your group-name is same as your user-id. Say, if your user-ID is akumar your group name is also akumar. If your brother's ID is bkumar, then you want to make bkumar a member of the group akumar. See How to manage users and groups? for how to add your brother's user-ID to your group.

Step Two: Change the permission of the folder you want to share.

Open Nautilus. Right click on the folder you want to share. Go to permissions tab. look for the group permissions and change it into "Read and Write." Check the box for allowing the same permissions to the files and folders inside.

Step Three: Verify that your brother can create delete files in the shared folder.

Let your brother login to the computer. Open Nautilus. It will open to your brother's home folder. Navigate to your home folder and open the shared folder by:

click on Computer or System Files (depends on the version of Ubuntu) on the left panel.

Double click on home folder, double click on folder named akumar inside home.

Create a file in the folder. Delete the new file.

Step Four: (optional) Make a link of this folder to your brother's home folder.

while logged in as your brother, open another window of Nautilus next to the first one, by middle-click or Ctrl+Left click. In your own home folder where the shared folder resides, hold down Ctrl+Shift and drag the shared folder to your brother's home folder.

Hope this helps

6
  • Step 3: i cant navigate to my home folder /home/arun from my brother's account.
    – ArunMKumar
    May 7, 2013 at 4:33
  • step1 , step2 completed as it is, me and my brother in same user group arun and i have changed the group permission to read and write.
    – ArunMKumar
    May 7, 2013 at 4:34
  • 3
    @user68186 I think there is a step missing: make sure to log out after you made them members of a certain group?
    – Andres
    Jun 21, 2014 at 20:15
  • Is there a solution through the terminal?
    – becko
    Jun 10, 2015 at 18:43
  • @becko each step can be done by command line on a terminal. Even if you can't add an user to a new group without sudo, you can change the permission of files and folders you own.
    – user68186
    Jun 11, 2015 at 3:04
12
sudo mkdir /shared
sudo chmod a+rw /shared

Now everyone can see and edit the /shared folder. Feel free putting files there and everyone will be able to access this folder and share files between users.

6
  • 2
    would "$sudo chmod g+w /shared" be a better answer since it will be only the group (brothers) and not the parents?
    – Andres
    Jun 21, 2014 at 20:25
  • @Andres - your solution will need more steps, like creating the group and adding several users to the group. I think my suggested solution is the quickest. Jun 22, 2014 at 6:57
  • 1
    this did not work. even I can't access the folder.
    – userJT
    May 8, 2017 at 17:08
  • 1
    This give write permissions without read. And it is a privacy/security risk to just grant access to everyone. Using a group is much better.
    – Maxim
    Feb 4, 2018 at 23:06
  • 1
    Changed - added +r. May 10, 2020 at 13:48
10

I would recommend the following solution: - Create a group for sharing, just call it "shared". - Add all users who should have access to the shared files to this group. - Create a directory outside of users homes, e.g. /shared for shared files. - Change group of this folder to the group for sharing and adjust group permissions. - Set group sticky bit for this shared folder.

Advantages of this solution: - Every file you copy into this folder automatically gets the shared group, so every user who is a member of this group can access these files without any additional effort. - You still can have your private files outside this folder with your personal group which are not accessible by other users as long as they cannot get root and they cannot boot with another Linux OS. But keep in mind: If you want to have real privacy then you have to use encrypted folders/files.

I'm wondering why Linux distributions still have no common solution for this problem, because nearly everyone is concerned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.