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
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,