How to set up multiple users on the same computer using the same DropBox folder?

6

3

I am running DropBox on a few computers, but one of those computers (a Mac) I have multiple accounts on. One account is for general usage and the other account is for software development. I'd like both computer accounts to access the same DropBox account, but ideally using the same folder on the computer so that one account isn't downloading the same files the other account just downloaded.

I tried putting my DropBox folder in /Users/Shared/DropBox but I end up with permission issues since files default to being owned by one account and not the other.

I suspect I'd need to create a group which both users are a member of and then make sure files are always group readable/writeable. Does anybody have better suggestions?

Brian Kelly

Posted 2011-06-14T14:22:45.257

Reputation: 161

Answers

3

Give both users the same permissions for the folder using chmod

If you want to give permissions to all users to read, write, execute put in sudo chmod -R a+rwx [folder name] in the Terminal.

UPDATE:

The above command only does it for the directory as it is, any new files/directories created will not inherit the permissions.

Put in chmod -R g+s [folder name] and this will set the permissions recursively and any future files and folders will have the correct permissions.

Run both commands to achieve sharing between the users of the DropBox folder.

paradd0x

Posted 2011-06-14T14:22:45.257

Reputation: 7 771

I think the issue is that the Dropbox process needs to be running with umask 002 in order to create files that read/write for the group. On a Mac, you can have all user processes set to run with umask 002 by creating the file /etc/launchd-user.conf and adding a single line 'umask 002'. See this page for more details: http://support.apple.com/en-us/HT201684

– kldavis4 – 2014-12-12T20:19:50.837

The problem is I need to do that for every new file/directory I create. I'm looking for a way where I don't have to do that. I love how transparent DropBox is and want to keep it that way. – Brian Kelly – 2011-06-14T14:32:47.890

You have one DropBox folder right? So set the permissions for that DropBox folder and add the -R flag to the command to make it recursive for the folders and files inside the folder. – paradd0x – 2011-06-14T14:35:28.683

1Using the group sticky bit will do what you want. chmod -R g+s Dropbox – Chris Nava – 2011-06-14T14:57:06.077

I will try this when I get back to the Mac in question. Thanks, guys. – Brian Kelly – 2011-06-14T15:09:46.570

The sticky bit solution doesn't seem to work. I set the sticky bit, create a file and it's still only user writable. – Brian Kelly – 2011-06-16T02:17:25.007

I think Darth Android has the best instructions. Did you follow that? – paradd0x – 2011-06-16T12:09:36.917

3

  1. First, move dropbox and clear out the /Users/Shared/DropBox/ folder (to simplify things, otherwise it's a good bit of manual work to fix all the permissions).
  2. Create a new group, call it DropBox
  3. Add both of your user accounts to the group DropBox
  4. Create the shared folder again if it doesn't already exist (mkdir /Users/Shared/DropBox)
  5. Set permissions on the folder:
    chown root:DropBox /Users/Shared/Dropbox/ chmod 0770 /Users/Shared/DropBox/ chmod g+s /Users/Shared/DropBox/
  6. Set Dropbox to point to that folder

Darth Android

Posted 2011-06-14T14:22:45.257

Reputation: 35 133

2

Note: I know nothing about Mac shares... These instructions are for *nix shared folders. They should work on a Mac. YMMV ;-)

First, you need to set the group sticky bit. chmod -R g+s Dropbox This will cause all new files/folders created in Dropbox to have the same group as the Dropbox folder.

Then you will need to change your umask to umask 002 if it isn't already. This will make sure all newly created files/folders are always writable to the group.

For files already in the Dropbox folder run chgrp -R {groupname} Dropbox to reset their group. Fill in whatever group name the user's all have in common.

[Edit] Here's an article on sticky bit that mentions setting up a "drop-box" folder for sharing. http://www.dba-oracle.com/linux/sticky_bit.htm

Chris Nava

Posted 2011-06-14T14:22:45.257

Reputation: 7 009