13

This seems like it should be easy, but...

My partner and I use a single Dropbox.com account to keep all of our joint projects synced up between our computers - and this has been working great for years. We've now added a MacBook Air to the mix, and we each have accounts on it and can grab it and go when we need to do some remote work.

I've been trying to get the Dropbox synced to the Air - but I want to have it in the "Shared" directory so that we both can access it - it shouldn't matter who is logged in. This doesn't seem to be working.

I can located the Dropbox in the shared directory fine - but when I change the user who is logged in that user has no permissions to sync the Dropbox or access the files.

I can get it to work if I create a separate ~/Dropbox folder for each user, but this ends up with 50GB duplicated twice over if the entire Dropbox syncs - a particularly ridiculous waste of space on an SSD.

Any ideas how to make this sharing work????

3
  • 1
    Seems like an edge case. You're asking Dropbox (and its associated file permissions) to work in a way for which it wasn't designed. I appreciate your wish to not dupe 50gb of data on an Air, but I'd fear possible problems introduced by solving this. The risk if data corruption isn't worth it—at least to me.
    – jaberg
    Commented Jan 31, 2013 at 17:23
  • Dropbox would probably suggest Dropbox for teams
    – mmmmmm
    Commented Jan 31, 2013 at 17:57
  • 1
    Allowing to specify a user group to give R&W to for new files would likely solve this. I've been manually resetting R&W to the Staff group on my machine for months without problems (similar to what MK suggests below). It would just be nice to have DB do this for me. Commented Feb 18, 2013 at 14:56

8 Answers 8

10

You can do this using ACLs, which will avoid permissions problems when new files are created:

sudo chmod -R +a "$USER allow read,write,append,delete,list,search,add_subdirectory,delete_child,file_inherit,directory_inherit" "$DIR"

where $USER is the username of the other user, and $DIR is whatever directory (Dropbox or otherwise) you want the other user to have full permissions in.

We use this to share a single Dropbox folder between four users (2 adults with full access, 2 kids with access to their subdirectory only), and it has been working well for us. The only limitation is that the user running Dropbox has to be logged in and running Dropbox. The other users don't have the Dropbox icon and status info in the menu bar.

1
  • What happens if setup ACLs and you run the dropbox app on all user accounts on the ACL? Does it mess up syncing? I wish there was a way this could be done without always having one account logged in. Commented Mar 20, 2016 at 21:46
3

One method I've used with some success is to set the permissions on the folder to allow multiple user accounts to "Read & Write" to the /Users/Shared/Dropbox/ folder.

You can do this by:

  • Going to the Get Info (Cmd+i) window on the /Users/Shared/Dropbox folder
  • Unlocking to edit permissions
  • Clicking on the "+" icon to add another user account and setting the "Privilege" to "Read & Write"
  • Click on the gear triangle dropdown to the left of the lock icon, choose "Apply to enclosed items..." and confirm that you wish to do this (irreversible) change

I'm not very sure, but you may still have some permission related issues if you get files from another Mac's user account. That may require assigning ownership correctly.

1
  • This seems to work - but if I add new files to the Dropbox they end up causing sync issues for the second user until I do this again.
    – radven
    Commented Nov 4, 2012 at 15:37
2

While not a complete solution, you can choose which dropbox folders to sync on your second account, thus reducing the amount of HDD space required and unnecessary duplicate files.

1
  • This is precisely what we do at home. My wife's folder is shared with mine, and she shares out to me only the content that she wants shared. From my account, I do likewise. So, for example, her photos are only on her machine, but 1Password's data, and our TextExpander configuration are shared between both devices.
    – Dave
    Commented Aug 16, 2013 at 13:07
1

You can also leave the Dropbox folder in the default location and symlink the ~/Dropbox into /Users/Shared/ and enable permissions with Terminal.app thusly:

    user@mac: ~$ ln -s ~/Dropbox /Users/Shared/Dropbox
    user@mac: ~$ chmod -R 777 ~/Dropbox
1

I wanted to use this same solution to work around a Dropbox for Business account with the "Allow only one Dropbox account per computer" restriction enabled.

The ACL solution is promising, but I encountered frequent permissions issues; it turns out ACLs are not inherited by existing files that are copied/moved into a directory, which is a deal breaker.

Here's the solution on which I eventually settled; this assumes all local administrator users will share access to the Dropbox.

  1. Choose a user to run Dropbox. The Dropbox folder will reside in this user's Home folder, and the user must be logged in for the Dropbox to sync.

  2. Change the umask for user applications to 002. This will make new files group-writable by default; this should not be dangerous, since your user's group is probably wheel, and all members of wheel already have sudo permissions.

    For OS X Yosemite 10.10.3 and up:

    sudo launchctl config user umask 002
    

    For older versions, see the Apple Support article Setting a custom umask in OS X.

  3. Restart your computer for the umask change to take effect.

  4. Recursively modify the permissions of your shared Dropbox folder to give full permissions to both user and group:

    cd $HOME
    sudo chmod -R ug=rwX Dropbox/
    
  5. For each user, add the group write permission to all pre-existing user files:

    cd $HOME
    sudo chmod -R g+w Desktop/ Documents/ Downloads/ Movies/ Music/ Pictures/ Public/ Sites/
    sudo chmod g-w Desktop/ Documents/ Downloads/ Movies/ Music/ Pictures/ Public/ Sites/
    

    The first chmod applies group write recursively; the second chmod removes group write from the directories themselves to keep them protected.

Everything should now work as intended. The second user can add the first user's Dropbox to the Finder sidebar, and Dropbox runs surprisingly well on the background user account. Only the Finder integration and menu bar status are missing.

Since each OS X user account can use this method to share its own Dropbox, this essentially provides for unlimited Dropbox accounts on a single machine.

0

My first thought would be to partition the HD (or SSD). One partition would have OS X, apps, user folders, etc., and the second would have only the Dropbox folder. Select the icon for the partition and check Ignore Permissions, and both users should have access. However, I've had volumes where I've checked Ignore Permissions revert so other users can't access this, but it's a quick fix.

1
  • I can see this working - but partitioning a drive just for Dropbox is a pretty heavyweight solution. Though... I wonder if a DMG disk image file could work as the home for it?
    – radven
    Commented May 8, 2013 at 18:34
0

This is simple actually.

  1. Login to 1st account.
  2. Sync dropbox to the shared directory. Let's say /user/shared/dropbox.
  3. Give permission to this shared directory to 2nd account. (to give 2nd account permission to edit/delete)

  4. Login to 2nd account.

  5. Sync dropbox to shared directory.
    • If you do this directly you will get an error that dropbox folder already exists.
    • Therefore, delete the folder first.
    • Sync shared directory again.
  6. Since 2nd account is the creator of the shared directory now. Make sure 2nd account gives permission to this shared directory to 1st account.
1
  • What happens if user #1 logs in again after the last step? How does syncing work then (with all files owned by user #2)?
    – nohillside
    Commented May 12, 2014 at 9:06
-3

You can use umask to set up restriction to file permission. Default setting is 022 so file mask is 644 (or 755 for dirs). Simple way is to set umask 002 (in file /etc/profile or some others), but this leads to security issue.

Oops, this is answer on the file permission problem when 2 users work under one Dropbox account on the same PC.

And the second one remark Mac users must edit umask in files /etc/launchd-user.conf or /etc/launchd.conf (see http://support.apple.com/kb/ht2202 for details)

1
  • 1
    This answer is confusing - why is the second paragraph here and the beginning of the third para is not clear either
    – mmmmmm
    Commented Feb 28, 2013 at 12:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .