Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Arrow CP to SMB share problem


    I'd like to backup a few configuration files on my Linux system (CentOS 4) to my windows share. 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 file copies with no problem. When I put the exact same command in a shell script and run it with ./ I get the error:

    CP: Cannot create regular file '/source/file/name /destination/file/name: No such file or directory

    The only difference I can think of between my CLI (as root) and the script would be the shell. It turns out my shell was bash and the script was set to #!/bin/sh so I changed it to #!/bin/bash, but it still gave the same error.

    I would appreciate any ideas anyone has. Thanks.

  2. #2
    Can somebody please help me out...I have no idea here...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •