NTFS ADS separator - Filename is forbidden

Contributor II

Trying to create something for my self-service for the end user to send the local Jamf log to the server for the team to be able to review - although I've never run into an error like this.  Grateful for any input


Script as follows:



##Get the serial number
serialNumber=$(system_profiler SPHardwareDataType | awk '/Serial Number/{print $4}')
##Get computer ID
id=$(curl -sku api:api -H "accept: text/xml" https://OURJAMFURL/JSSResource/computers/serialnumber/$serialNumber -X GET | xmllint --xpath '/computer/ general/id/text()' - )
##API call to upload the system log to the computer running the policy
curl -sku api:api https://OURJAMFURL/JSSResource/fileuploads/computers/id/$id -F "name=@/private/var/log/jamf.log; filename=system-`date +%F\ %T`.log" -X POST

And the error is:


##Script result: <html>
<title>Status page</title>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Conflict</p>
<p>API file upload exception:java.lang.IllegalArgumentException: NTFS ADS separator (&apos;:&apos;) in file name is forbidden.</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.



New Contributor II

After upgrading to Bitbucket v7.13 or higher on Windows, the solution is to update the all file path or directory names for all properties with double slash(\\) in the bitbucket.properties file. The application should now start without any errors.

For example,


McKesson SMO

Contributor II

I found that on Google as well, although that didn't resolve it.