9
9
I have two machines, a Mac and a PC running Linux, that I am trying to keep a certain file synced between using Dropbox.
One of the files that I am syncing needs to be writable by another user (different UID on the same machine, not referring to another dropbox user) besides myself. To be more specific, this other UID is actually a daemon. So, either the file needs to be owned by that other user, or else write permission is needed for "group" and/or "other". Initially I have set it up this way on both machines. In addition, the directory containing the file is already owned (chmod 777) by the user that needs to have write access to the file.
However, whenever the file gets synced from one box to another, it appears that Dropbox completely ignores both sets of permissions, and changes the permissions on the newly updated file to be owned by me with permissions 0644 (rw for me, r for everyone else). If the file isn't owned by me it even changes ownership back to myself! As a result, the other user no longer has write permissions until I manually go in and re-chmod the file.
Additional things I have tried that have not worked:
made sure the user account (for the "other user") on both machines has the same UID. Not sure why this would be necessary, since my primary account doesn't have the same UID on both machines.
chmod u+s <dir>
andchmod g+s <dir>
where is the directory containing the file in question.changing ownership of the file to the other user and placing it outside the Dropbox directory, and creating a symlink to the file in the Dropbox directory. Dropbox actually deletes the symlink, leaves the original file (outside the Dropbox directory) unchanged, and creates a new copy of the file where the symlink used to be!
How can I set things up so that my permissions and/or ownership are preserved?
@Michael, did Dropbox ever respond to your service request? – bbozo – 2016-05-26T07:45:04.297
@bbozo no, they did not – Michael – 2016-05-26T23:46:24.123
Interesting. Can you explain a little bit more what this line and the modified file in general does? – nixda – 2013-02-12T08:08:41.553
The start-stop-daemon is a Linux utility that lets you control various settings under which a daemon runs. Most of the parameters are passed in a shell variables. The key modifications are the addition of "--umask 0006" which leaves R/W permission for user and group but removes it for others, and the addition of the group parameter (":$dbgrp") to the -c parameter, which sets the UID/GID the daemon process runs as). The Mac command is similar, but I haven't found a similar utility, so relies on setting up these settings in the shell that runs Dropbox. – Michael – 2013-02-12T14:34:47.157
Does this apply to the current dropbox version as well? My dropboxd script is
PAR=$(dirname $(readlink -f $0)) OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH LD_LIBRARY_PATH=$PAR${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH exec $PAR/dropbox $@
and is located in ./.dropbox-dist/ and is managed through the supplied python script – bicycle – 2013-08-08T07:40:24.110@bicycle I haven't been prompted to update my dropbox client since coming up with this solution. – Michael – 2013-09-01T18:57:30.420