I have a python program, stored on Dropbox, which runs via cron on a couple of different machines. For some reason, recently one of the .pyc files is being created with root as the owner, which means that Dropbox doesn't have permission to sync it anymore.
Why would it do that, and how do I change it?
That would happen if you're running the python program as root (which would happen if you're using root's crontab).
To fix it, just remove it with sudo rm /path/to/file.pyc, and make sure to run the program as your user next time. If you want to keep using root's crontab, you could use su youruser -c yourprogram, but the cleanest way would be simply to use your user's crontab
Python pyc files created with root as owner