Ubuntu 服务器 - 无需登录用户即可同步 Dropbox

Ubuntu 服务器 - 无需登录用户即可同步 Dropbox

安装 Dropbox 来自https://www.dropbox.com/en/install-linux并下载了 Python 脚本。然后配置了我的账户,一切正常。

我的目标是让 dropbox 上传在用户目录上创建的新文件,无论用户是否登录。

我尝试使用下面的脚本,但它失败并出现 203 错误,重新启动并再次出现 203。一旦我以该用户身份登录,守护进程就可以正常工作。有什么想法吗?我该如何跟踪 203/EXEC 错误?

内容/etc/systemd/system/dropbox.service

[Unit]
Description=Dropbox Daemon.
After=network-online.target

[Service]
User=server
ExecStart=/home/server/.dropbox-dist/dropboxd
Type=simple
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target

journalctl -u dropbox.service

systemd[1]: Started Dropbox Daemon.
systemd[1]: dropbox.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: dropbox.service: Unit entered failed state.
systemd[1]: dropbox.service: Failed with result 'exit-code'.
systemd[1]: dropbox.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped Dropbox Daemon.

一旦我登录:

dropboxd[1616]: dropbox: locating interpreter
dropboxd[1616]: dropbox: logging to /tmp/dropbox-antifreeze-Y5jTff
dropboxd[1616]: dropbox: initializing
dropboxd[1616]: dropbox: initializing python 3.7.2
dropboxd[1616]: dropbox: setting program path '/home/server/.dropbox-dist/dropbox-lnx.x86-84.4.170/dropbox'
dropboxd[1616]: dropbox: python initialized
dropboxd[1616]: dropbox: running dropbox

sudo journalctl-xe

systemd[1448]: dropbox.service: Failed at step EXEC spawning /home/server/.dropbox-dist/dropboxd: No such file or directory
-- Subject: Process /home/server/.dropbox-dist/dropboxd could not be executed

提前致谢!

答案1

问题是主目录被加密了!刚刚跟进本文禁用加密,重新启动即可。

相关内容