各位大大好
小弟碰上一個問題是,
我想要在開機時跑一個bash檔
該檔案會用rsync去同步兩個資料夾 (從mount的disk到local資料夾)
自己試著跑 (root) 那個bash檔時很順利,
但開機時自動跑 (/etc/rc.local) 時,exclude-from的部分就會報錯:
以下是rsync指令:
rsync -avz --delete --delay-updates --exclude-from
'/path-to-file/exclude.txt' /src-path/ /dst-path/
以下是錯誤訊息:
rsync: failed to open exclude file /path-to-file/exclude.txt:
Permission denied (13)
rsync error: error in file IO (code 11) at exclude.c(1062) [client=3.0.6]
但指令中我使用的路徑都是絕對路徑,
也用了不同的身分去跑跑看或修改權限,
問題仍然持續,
請問是否有大大能夠幫忙解答?
感謝
--
All Comments