Solution
If Dropbox finds files in its directory that aren't owned by your user, it will try to run a script with super user privileges to change the ownership of those files to your user.
The safest option is to change the permissions yourself (derived from
Pablo Bianchi's answer):
find ~/Dropbox/ ! -user $USER -exec sudo chown $USER:$USER "{}" \;
Alternatively, enter your credentials and let it run the script. This is only recommended if you can confirm Dropbox is creating the popup (more details below).
If you click Cancel, Dropbox won't run the script but you'll continue to get the popup because it will continue to detect the problem.
Details
I just got this same popup, but not at login:
I expanded Details and then I searched the web for org.freedesktop.policykit.exec
which pointed me to pkexec
.
(Unfortunately, I've only seen Details when using Xfce. I haven't seen it when running other desktop environments such as Gnome).
Looking through my processes for pkexec
, I found:
$ ps -ef | grep [p]kexec
root 11040 26447 0 14:16 ? 00:00:00 pkexec /bin/sh /tmp/tmp5vgk_93m
So of course I was curious what that file was doing:
$ cat /tmp/tmp5vgk_93m
#!/bin/bash
chown -h -R 1234 "/home/user/Dropbox"
chmod -R u+rwX "/home/user/Dropbox"
It looks like Dropbox must have detected that there are some files in my Dropbox folder that aren't owned by my current user.
I used find
to confirm:
$ find ~/Dropbox/ ! -user $USER
/home/user/Dropbox/Projects/picodrive/cpu/fame/famec.o
/home/user/Dropbox/Projects/picodrive/cpu/drc/cmn.o
/home/user/Dropbox/Projects/picodrive/cpu/cz80/cz80.o
...
Sure enough, looks like some of the files aren't owned by my user:
$ ls -l /home/user/Dropbox/Projects/picodrive/cpu/fame/famec.o
-rw-r--r-- 1 root root 1346564 Dec 18 13:33 /home/user/Dropbox/Projects/picodrive/cpu/fame/famec.o
In theory Dropbox shouldn't have any problem syncing that file since it's world-readable, but at least what they're doing makes sense.
I also noticed that while Dropbox was syncing I saw errors like this, which seems to be an additional confirmation:
Can't sync "famec.o" (access denied)
Last but not least, I'm going to put this here because I had trouble searching the web for this problem:
Authentication is needed to run `/bin/sh' as the super user
sudo sh
in itsExec
line?