/build/static/layout/Breadcrumb_cap_w.png

Upload file from Mac via Online KScript

So I have an Online KScript that does everything I want it to except for Upload a file. The script zips a folder of logs from another program and uploads it so I can review them later. The Zip file is only about 3.5MB. 

However, when I run the script, it always fails and never uploads the file. This is the only line I get about the upload in the log: 

"Uploading file: /Library/Application\ Support/Dell/KACE/data/kbots_cache/packages/kbots/239 cpfiles.zip"

As you can see, it looks like it's adding a space between the folder and the filename for some reason. I've tried adding a "/" to the end of the directory, but it just does "239/ cpfiles.zip," still with a space. I've put the filename in with the directory and left the filename part blank, but it still failed. 

Does anyone know how to get an Online KScript to upload a file from a Mac? Alternatly, do you know how to get an Online Shell Script to upload a file to the K1000 server? Or anywhere else? 


1 Comment   [ + ] Show comment
  • Hello, Did you ever figure this out? I'm having the same issue.

    Thanks! - dlcaldwell 8 years ago
    • This was from about 3 years ago, so I don't really remember, and we're running the latest version of kbox now, so I don't think it has the same issue, that I remember. However, looking at what I wrote again, I'd say that if your path has spaces in it (like /Library/Application Support), do NOT escape the space when typing it in the field in the online kscript builder - that seemed wrong to me, but it works, I'm pretty sure. I know I have also used the option that someone suggested in the comments of uploading to the clientdrop smb share, and that works, but requires a full shell script to really get it done. - mrhollywoodgates 8 years ago

Answers (2)

Answer Summary:
Posted by: jknox 11 years ago
Red Belt
0

I'm not immediately aware of a way to upload a file to the K1000 like this.  I don't believe it's possible (or at least easy).  To my knowledge, you would have to upload the clientdrop folder (\\yourk1000\clientdrop) and to do that you would have to provide samba credentials.

Depending on what's in the logs you might be able to create a custom inventory rule to read file, although it probably would have to be unzipped.

Something like this:  ShellCommandTextReturn(cat /path/to/file.txt)


Comments:
  • I've used the Upload a file feature before on Windows and it's worked without issue. It uploads to the "Uploaded files" section of the computer in Inventory. Here's a screenshot of the function: http://dropbox.biola.edu/Akkk8
    However, I cannot get it to work with Mac. It seems like it's having some problem with Syntax.

    I'll try uploading it to the client drop in a shell script, but I wonder if there's an answer to why this will work with windows and not Mac? or if I'm doing something differently. - mrhollywoodgates 11 years ago
    • Wow, I didn't know that feature even existed. I'd suggest enabling debug, running the script and then opening a support ticket with the debug logs.

      Mac commands for enabling debug on 5.3/5.4 agent are:

      1. To automatically set debug through a script:

      Scripting>K1000 Agent Debug Log Enable (Mac/Linux)

      Add the machine(s) you want to enable debug on to;Limit Deployment To Listed Machines; and click Run Now.

      2. How to manually set debug:
       
      a. Open Terminal by going to ‘Applications>Utilities.
      b. Execute: sudo /Library/Application\ Support/Dell/KACE/bin/AMPTools debug=true

      Send all of the .log and .conf files from Library/Application\ Support/Dell/KACE/data - jknox 11 years ago
  • Thanks for the suggestion! I'll give that a try when I get time. For the time being I took your other idea and uploaded it to the clientdrop via mount_smbfs in a shell script - mrhollywoodgates 11 years ago
Posted by: jdornan 11 years ago
Red Belt
0

If its adding a space, (which Im not sure why it would but I cant see the end of the path in your screenshot) Hav eyou ried escaping the path with /? Even if this works Id still open a support ticket it adress the syntax bug but it may provide a workaround. 

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ