Strange indeed.
Still, permissions is the likely problem. Many times I have checked and re-checked permissions, only to find that I have overlooked something when I look again. Check every directory in the full path.
You say it works when the file is in the same directory as the script. Maybe the problem is on the source server where you are running the script, rather than on the remote server to which you are trying to write the script. Check the permissions on the local server also.
In reply to Re^7: transfer a file via SFTP
by ig
in thread transfer a file via SFTP
by cc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |