bash中使用rsync的問題 - Linux

By Regina
at 2016-01-06T18:05
at 2016-01-06T18:05
Table of Contents
各位大大好
小弟碰上一個問題是,
我想要在開機時跑一個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]
但指令中我使用的路徑都是絕對路徑,
也用了不同的身分去跑跑看或修改權限,
問題仍然持續,
請問是否有大大能夠幫忙解答?
感謝
--
Tags:
Linux
All Comments

By Valerie
at 2016-01-09T01:13
at 2016-01-09T01:13

By Edwina
at 2016-01-09T18:49
at 2016-01-09T18:49

By Frederica
at 2016-01-11T15:51
at 2016-01-11T15:51

By Isla
at 2016-01-13T18:17
at 2016-01-13T18:17

By Bennie
at 2016-01-14T22:04
at 2016-01-14T22:04

By Frederic
at 2016-01-17T13:55
at 2016-01-17T13:55

By Jacob
at 2016-01-21T05:28
at 2016-01-21T05:28

By Callum
at 2016-01-24T05:29
at 2016-01-24T05:29

By Freda
at 2016-01-24T15:52
at 2016-01-24T15:52

By Hedy
at 2016-01-28T06:56
at 2016-01-28T06:56

By Hedwig
at 2016-02-01T03:57
at 2016-02-01T03:57
Related Posts
CentOS 5.3 安裝 MySQL 5.6 版的問題

By Margaret
at 2016-01-05T12:11
at 2016-01-05T12:11
解決 Sublime Text 忽然無法安裝 Package

By Hedda
at 2016-01-04T20:03
at 2016-01-04T20:03
windows下用dd的usb沒法用?

By Isabella
at 2016-01-04T00:16
at 2016-01-04T00:16
unbuntu15.10如何用samba連nas

By Frederica
at 2016-01-03T19:19
at 2016-01-03T19:19
快樂學習 Linux 指令懶人包

By Lucy
at 2016-01-03T15:48
at 2016-01-03T15:48