E
E
Eugene2019-02-20 07:27:36
linux
Eugene, 2019-02-20 07:27:36

The Bash script does not work in crontab, but works by hand. Why?

To be precise, only one line from the script does not work. After much digging, I reduced the script itself to this one line to cut off the excess. Here she is:

mount.cifs //172.16.1.100/d$ /mnt/zd-backup -o user=IvanovAV,pass="pass"

This script works fine when MANUALly launched from under the root, but if you add it to the root crontab task, then it starts itself, but the mount does not occur.
How can this be? OS: CentOS 7

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2019-02-20
@ewill

To get started, try specifying the full path to mount.cifs
Or check that the command is available in one of the paths specified in the PATH variable at the beginning of crontab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question