也许是一个容易的问题,但我感到困惑:
When I run the following script manually, it works fine. While I am not running this script as user git but as user X I am able to use the ls and du commands which are applied to git users home directory. If I try to run this script in a cronjob, these two commands are not regular invoked, don t know why. The first "extern" invocation of a cmd-file works perfect in both cases and yields a regular output.
我已注意到: 我仅能将文字作为用户X,有/有缺陷,并储存在用户家名录上。
Cron与用户X的特权。
......?
文本:runbackup.sh:
#!/bin/bash
/cygdrive/e/xp-batches/backup.cmd > info.log
echo "### CURRENT HOMEDIR ###" >> info.log
ls -gh --block-size=K /home/git >> info.log
echo "### SIZE ###" >> info.log
du -hs /home/git >> info.log
email -s "Backup Status" [email protected] < info.log