I am getting Couldn't canonicalise: No such file or directory error while getting single file using sftp.
here is what I am doing,
#!/bin/ksh
. /feeds/scripts/files.properties
filename=$1.txt
echo $filename
sftp $getusername#$getserver << EOF >> $logfile
cd /feeds/out/data/
lcd /feeds/files/
get $filename
bye
EOF
I am able to print/echo file name, but while executing scripts I am getting below error,
user:/feeds/scripts> ./fileReceiver.sh sample
sample.txt
Connecting to xxxxx.xxx.xxx...
Couldn't canonicalise: No such file or directory
Couldn't stat remote file: No such file or directory
File "/u/user/sample.txt" not found.
I don't know why it adds '/u/user' before file name. Can anyone please help?
Thanks in advance.
Solved!, I am sorry, my mistake. In property file, I had mentioned wrong server name. Server names looks very similar so couldn't figure it out. Anyways, thanks #devnull, I gone through it, its useful.
For me solution was removing / from directory name at end
Non-working
/folder-name/
Working
/folder-name
Related
I am trying to compress multiple netcdf files in different folders through a loop.
for i in `find . -iname 'wrfout*'`;
do
echo $i
time nccopy -d5 -s $i d_${i}
When I run this code, I get an error message
"./wrfout_d04_2011-08-13_00:00:00
Permission denied
Location: file ../../ncdump/nccopy.c; line 1429".
However, when I run the last line in the loop for individual files, it runs without any error messages. I have checked the permission mode for the execution file to "777" just to be sure, but still the error persists. Any help with this is approciated.
Your bash syntax suggests your output filenames are going to look like 'd_./wrfout_d04_2011-08-13_00:00:00'
Suggestion:
nccopy -d5 -s $i $(dirname $i)/d_$(basename $i)
I am trying to upload a dSYM file to Firebase using this command:
./Pods/FirebaseCrash/batch-upload -i ./Info.plist -p ./GoogleService-Info.plist ./service-accounts/mtb.json 78*****C-5**4-3***-***C-00*********7
But each time I run this, I get back the following errors
./Pods/FirebaseCrash/upload-sym-util.bash:377: error: symbolFileMappings:upsert: The uploaded file is not a valid Breakpad Symbol file.
./Pods/FirebaseCrash/upload-sym-util.bash:378: note: symbolFileMappings:upsert: The metadata for the symbol file failed to update.
I have tried this link https://groups.google.com/forum/#!msg/firebase-talk/4829Sp1_uKY/IEC_T4-VBAAJ but haven't had any luck as it errors out to
usage: batch-upload [-hv] [-p google-service] [-i info] service-account-file {mach-o file|uuid}
Can someone help me on this one please?
Thanks
Apparently this bug relates to batch-upload script having problems with archives, so you would need to patch it manually.
Try the following:
Change extract_symbols_and_upload "$EXE" "$ARCH" "$BUNDLE" to
extract_symbols_and_upload "$EXE" "$ARCH" "$BUNDLE/$BNDL_PATH"
The dump_syms utility understands dSYM bundles but not archives,
curiously enough. This fix will go out with the next release.
Source
I am trying to use lua to access redis values from nginx. When i execute lua files on command line there everything is ok i am able to read and write values to redis. But i when try to execute the same files from nginx by accessing a location in which access_by_lua directive is written the following error logged in error log file
no field package.preload['socket']
no file '/home/sivag/redis/redis-lua/src/socket.lua'
no file 'src/socket.lua'
no file '/home/sivag/lua/socket.lua'
no file '/opt/openresty/lualib/socket.so'
no file './socket.so'
no file '/usr/local/lib/lua/5.1/socket.so'
no file '/opt/openresty/luajit/lib/lua/5.1/socket.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
What is the reason for this and how can i resolve this?
In my case I just needed to install the lua-socket package, as the socket library is not built into the default Lua installation like it is in some other languages.
You get this error because your code executes the command require("socket")
This command will search for a file with that name in several directories. If successful the content will be executed as Lua code. If it is not successful you'll end up with your error message.
In order to fix this you have to add the path containing the file either to the system variable LUA_PATH or you have to add it to the global table package.path befor you require the file.
Lua will replace ? with the name you give to require()
For example
package.path = package.path .. ";" .. thisPathContainsTheLuaFile .. "?.lua"
Please read:
http://www.lua.org/manual/5.3/manual.html#pdf-require
https://www.lua.org/pil/8.1.html
I am uploading a file from a collection of different servers to one data server. I am using psftp and one out of 20+ servers is producing a permissions problem.
Remote working directory is /
psftp> cd Remote_Directory\
Remote directory is now /Remote_Directory/
psftp> put C:\folders\containing\file\FILE.zip
/Remote_Directory/: open for write: failure
psftp> quit
It appears like a permissions issue on the remote directory, however, why am I only getting the issue on one server? The batch is identical on all of the 20+ servers.
PUT command expects a file name at the end of the destination location.
Please try the following code
put C:\folders\containing\file\FILE.zip /Remote_Directory/FILE.zip
The path in the error message is an exact path to the remote file the psftp tried to create. See outfname in below code snippet:
req = fxp_open_send(outfname,
SSH_FXF_WRITE | SSH_FXF_CREAT | SSH_FXF_TRUNC,
&attrs);
...
printf("%s: open for write: %s\n", outfname, fxp_error());
As the path is obviously not correct (lacks file name), it seems that psftp got confused somehow. I believe it's likely due to wrong (back)slash you have used in the cd command.
Try cd Remote_Directory/.
In my case, it's a permission issue on the remote server, i.e. the account you are using to log on doesn't have the write permission for the remote folder.
I am using XAMPP a Mac for local development, but I used this code at work (using Windows and an otherwise identical development environment) and it worked fine:
$objPHPExcel = new PHPExcel();
$sheet = $objPHPExcel->createSheet();
$sheet->fromArray($a);
...
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
//$objWriter->save('P:/Projects/Mess3/Sadness.xlsx');
$objWriter->save('/Users/tjb1982/Desktop/sadness.xlsx');
The commented-out text works with my Windows system at work. I tried to output the file to 'php://output' and got a garbled mess (is that what is to be expected?).
I can't seem to find anyone who is experiencing this problem outside of those who had permissions problems or had the file open when they were trying to save it. Please help!
I was getting the same error "Cannot close zip file.." and realized it didn't have permissions to write to that directory. Check your write permissions. (IIS8 + php + mysql + oracle)
Once i allowed write permissions problem was immediately fixed.
Generally this means one of 3 things:
The directory where you're trying to save the file doesn't exist
The directory/file has permissions that preclude you from writing to it
The file is already open in some other application, or has a lock on it
I had the same problem, just added the path in the save method and it worked
$objWriter->save(dirname(FILE)."dir1"."/".$file.".xlsx");
I found that this problem is caused when you execute the code once and then open the outputted excel file with Office excel. Try closing the file in excel and then try! Hope this helps!
I had the same problem, actually you have to modify the basic rights of reading and writing given to your PHPWord directory:
chmod -R 777 PHPWord/