Different behaviour between onedrive called from command line to service (systemd) caused by PrivateUsers=true #2264
Swallowtail23
started this conversation in
General
Replies: 1 comment 7 replies
-
Thanks for the valuable feedback. This will be a direct effect of #2205 and the blast radius on this is going to be pretty big. I am going to update the main code, but I think this may even warrant a v2.4.23 release as files should never be deleted because of a systemd option being enabled ...... @bluca - As you can see - not everyone runs Debian | Ubuntu - and your PR is now causing a really bad outcome. I guess the implications of these options are not really understood by the systemd developers .... |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, this post started out as me looking for some help with inconsistency from onedrive called on the command line (as root) and run under systemd service (also as root). But as I worked through the post i worked out the issue, so I'm posting here in case anyone else hits similar.
RHEL9, running 2.4.22.
Background - replacement file server, 1TB of data previously synced to onedrive. New server run up, data drives detached and attached to new server, and mounted into /root/OneDrive/EMP95-sync, same as previous server. I ran
onedrive --synchronize --resync --verbose
from the command line, and over a couple of days it ran through the entire 1TB, and reached "Sync with onedrive is complete". All good. I can now repeat that outcome from the command line withonedrive --monitor
- it runs through the entire db, complains about some desktop.ini files being skipped, then reaches "Sync with onedrive is complete".Then I tried starting the service... and it all went pear-shaped. It started deleting files from onedrive, and nuked about 250GB before I realised what it was doing and stopped it. I re-ran from the command line, and spent another couple of days re-uploading the 250GB, until it again ended up at "sync complete".
At this point, rather gun-shy, I set dry-run in the config file. Re-ran from the command line - all good.
So then I tried
systemctl start onedrive
again...Yikes, fortunately dry-run is configured:
So far so good. Then a bunch of permission errors, e.g.:
...a heap more... ...then it starts deleting stuff, e.g.:
...a heap more deletes, and then it says "complete" and drops to monitoring.
I figured the only thing different are the service file hardenings - and true enough, it is PrivateUsers which causes it. Comment that out, and the service runs the same as the command line.
I realise this is not a OneDrive client issue (it is working well, thank you!) but maybe worth dropping into documentation somewhere that this can happen.
Beta Was this translation helpful? Give feedback.
All reactions