Below is the text of the script (only the paths are modified). I run this exact command manually and it works. I run the script and I get the error.
#!/bin/bash
#
#backs up important files
#
cp /path/to/local/file /smb/share/path
Search found 23 matches
- 2007/10/07 00:04:00
- Forum: CentOS 4 - Networking Support
- Topic: Having trouble with a SMB share and the CP command
- Replies: 4
- Views: 1026
- 2007/10/04 18:15:04
- Forum: CentOS 4 - Networking Support
- Topic: Having trouble with a SMB share and the CP command
- Replies: 4
- Views: 1026
Having trouble with a SMB share and the CP command
I'd like to backup a few configuration files on my CentOS 4 system to my remote windows share (on the same network segment). Currently the share is permanently mounted into the Linux filesystem via Samba and the /etc/fstab. When I issue the command cp /source/file/name /destination/file/name the fil...
- 2007/06/04 15:31:31
- Forum: CentOS 4 - General Support
- Topic: ftp in a shell script
- Replies: 4
- Views: 503
Re: ftp in a shell script
Can anyone help at all? I really need to get this fixed. Any help at all would be appreciated. Thanks.
- 2007/05/23 17:40:14
- Forum: CentOS 4 - General Support
- Topic: ftp in a shell script
- Replies: 4
- Views: 503
ftp in a shell script
I have a shell script that looks like this: #!/bin/sh HOST='www.my_host_address.tld' USER='my_username' PASSWD='my_password' FILE='/full/path/to/my/file.txt' /usr/bin/ftp -n $HOST << END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE quit END_SCRIPT exit 0 When I run it from the command line w...
- 2007/05/20 21:36:27
- Forum: CentOS 4 - General Support
- Topic: First crontab job
- Replies: 16
- Views: 1179
Re: First crontab job
[quote] pjwelsh wrote: Just to make sure we are on the same page: 1. Your "/path/to/my/script.sh" has, as the first line of the file, "#!/bin/bash" 2. after that, in that script.sh file, you have ". /etc/profile" (yes that is a period in front of the space and /etc/profile for a shotgun fix) 3. the ...
- 2007/05/16 19:43:49
- Forum: CentOS 4 - General Support
- Topic: First crontab job
- Replies: 16
- Views: 1179
Re: First crontab job
I just mean why won't my script run on the crontab when it runs perfectly from the command line...
- 2007/05/16 19:15:55
- Forum: CentOS 4 - General Support
- Topic: First crontab job
- Replies: 16
- Views: 1179
Re: First crontab job
I changed the /etc/selinux/config. I changed it to permissive. I also added the SHELL=/bin/bash statement into the crontab. I still get the same two errors (could not open X file and not recognized -u on the ftp command). What does it take to get the crontab to run a script with the EXACT same permi...
- 2007/05/15 13:14:53
- Forum: CentOS 4 - General Support
- Topic: First crontab job
- Replies: 16
- Views: 1179
Re: First crontab job
I think I am running SELINUX. How can I disable it or at least disable the "enforcement mode"?
- 2007/05/14 23:57:19
- Forum: CentOS 4 - General Support
- Topic: First crontab job
- Replies: 16
- Views: 1179
Re: First crontab job
Specifying the full path cleared up the file errors, but not all of them. (1) can't open a local file and (2) doesn't recognize the -u option on the ftp command (which is necessary for my configuration). What I don't understand is why the script runs perfectly with ./ but has these errors when it's ...
- 2007/05/14 22:33:01
- Forum: CentOS 4 - General Support
- Topic: First crontab job
- Replies: 16
- Views: 1179
Re: First crontab job
1. There was a terminal attached. That is why I expected to see the echo and did not expect it to mail to root.
2. The script technically runs, it's just that everything fails. It says each file does not exists. Maybe I should specify the full path to each file and see if that works.
2. The script technically runs, it's just that everything fails. It says each file does not exists. Maybe I should specify the full path to each file and see if that works.