I have a specific OS user called 'app' which runs Dropbox. The app is deployed (in the same server) for multiple sites. But the Dropbox of the 'app' user has info about all sites.

The dropobox has a directory like /home/app/Dropbox/Sites/siteXXX/folder one for each site. All Dropbox folder is automatically created with the OS user 'app'.

However, each installation of the app uses an internal folder of the dropbox. For example: /app/sites/siteXXX/siteData/shared/folder. Each instance of the app runs with a particular OS user, for example 'siteXXX'. The problem is that I want all /app/sites/siteXXX/siteData/shared/folder to be 700 and with ownership siteXXX. The app can create or edit new files. In addition, Dropbox user 'app' should continue to be able to sync....

So...to solve this I installed bindfs and added this to the fstab:

/home/app/Dropbox/Sites/siteXXX/folder /app/sites/siteXXX/siteData/shared/folder fuse.bindfs force-user=siteXXX,force-group=siteXXX,perms=0700 0 0

This gives me what I want in /app/sites/siteXXX/siteData/shared/folder: 700 and ownership of siteXXX.

The problem is now that if I create a file from the app it will be created with the user 'siteXXX'. Dropbox will likely be able to read it (because most files get read others by default). But it won't be likely to update it if there are newer versions since the file could have been created with 644 and Dropbox is running with 'app' OS user.

Sorry if the explanation is a bit messy. Is there some workaround for this? Is there a way I can keep the original /home/app/Dropbox/Sites/siteXXX/folder with the 'app' user no matter what?

Thanks in advance,


If I understood the question correctly, you should check out the --create-for-user and --create-with-perms options.

  • 1
    Thank you very much, that was exactly what I was looking for!! That worked perfectly. Just as a reference, the final fstab line is this: /home/app/Dropbox/Sites/siteXXX/folder /app/sites/siteXXX/siteData/shared/folder fuse.bindfs force-user=siteXXX,force-group=siteXXX,perms=0600:u+X,create-for-user=app,create-for-group=app 0 0 . That way, everything in /app/sites/siteXXX/siteData/shared/folder is 700 and 600 and owned by 'siteXXX'. However, newly or modified files/directories by the user 'siteXXX' in that directly, are seen in the dropbox folder with default permission and owned by 'app' – Mariano Martinez Peck Feb 18 '15 at 12:29

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.