Skip to main content
Jamf Nation, hosted by Jamf, is a knowledgeable community of Apple-focused admins and Jamf users. Join us in person at the ninth annual Jamf Nation User Conference (JNUC) this November for three days of learning, laughter and IT love.

Troubleshooting HTTP File Share Distribution Points

Symptoms

A managed computer submits an error back to the JAMF Software Server (JSS) after failing to install a package. The possible error messages are:

  • line 1: syntax error near unexpected token ‘newline’
  • The Downloaded Package Could Not be Verified

Explanation

HTTP downloads are enabled but are not working properly on your JSS because the symbolic link (symlink) in your web server root directory does not point at your share.

Resolution

Note: The location of the web server root directory will vary depending on which OS you are running and where you set up your file share distribution point. Below are the default locations for OS X:
- OS X v10.6: /Library/WebServer/Documents/CasperShare
- OS X v10.7 and later: /Library/Server/Web/Data/Sites/Default/CasperShare

To recreate the symlink (v8.2 and later):

  1. Open Terminal on the JSS host server.
  2. Execute the following command:
    sudo ln -s /path/to/share/ /path/to/web/server/root/directory/
    Note: This command will work on OS X and Ubuntu. However, it may vary depending on which OS you are running.

To recreate the symlink (v8.1 and earlier):

  1. Open the JSS Setup Utility.
  2. Click HTTP Downloads.
  3. Click Create Link.

If recreating the symlink fails to resolve the error, you can manually troubleshoot HTTP downloads with the steps below.

To troubleshoot HTTP downloads (v8.2 and later):

  1. From your file share distribution point server running the HTTP service, navigate to the web server root directory.
  2. Verify that the symlink points at your actual share location. Note: If your web server root directory is not in the standard location, copy the symlink to this directory.
  3. Navigate to http://jssurl/share/Packages/packagename.dmg to see if you are able to download the package. Note: This address depends on the server address specified in the JSS for distribution points.
  4. If you cannot download the package, check your settings in the JSS to make sure you have the correct information about the file share distribution point.

To troubleshoot HTTP downloads (v8.1 and earlier):

  1. From your file share distribution point server running the HTTP service, navigate to the web server root directory.
  2. Delete the symlink for the share in this directory. If the symlink is not there, proceed to the next step.
  3. Verify that your Local Path and SSH Username and Password entries are correct for the distribution point. a. Log in to the JSS. b. Click Settings (v8.0-8.1). If you are using v7.31 or earlier, click Management. c. Click Servers (v8.0-8.1). If you are using v7.31 or earlier, click Distribution Points. d. Click Edit Server on the desired distribution point you are fixing HTTP Downloads. e. On the General pane, verify that your Local Path is correct in the text field.
  4. Open the JSS Setup Utility and click HTTP Downloads under Server & Services for your desired distribution point. Note: If modifying the master file share distribution point, and if that distribution point is located on the same server as your JSS, use the same value listed in your JSS web interface for the DNS or IP Address in your JSS Setup Utility connection.
  5. Click Create Link.
  6. Verify that the symlink was created in your web documents root directory and that it points to the share. Note: If your web server root directory is not in the standard location, copy the symlink to your directory.
Like Comment
Order by:
SOLVED Posted: by wangl2

Hi erin,
To recreate the symlink (v8.2 and later), I am hosting JSS on Windows. How do I recreate Symlink?
Thanks.

Like
SOLVED Posted: by leslie

It's something like:
mklink /D C:\inetpub\wwwroot\CasperShare C:\CasperShare

Where C:\CasperShare is your existing Casper Share.

Like
SOLVED Posted: by wangl2

Hi Leslie,
My JSS is on Windows 2008 but Casper Share is on a Mac Mini Lion Server.
So I have two questions for mklink /D "C:\Program Files\JSS\Tomcat\webapps\ROOT\CasperShare" C:\CasperShare

  1. There is no CasperShare folder under "C:\Program Files\JSS\Tomcat\webapps\ROOT\"
    So do I manually create that folder first before I ran the mklink command?

  2. Since my CasperShare is on a different server, how do I change it from C:\CasperShare? Do I use UNC path or something?
    Thank you very much.

Like
SOLVED Posted: by bentoms

FYI on some 10.7.3 servers the SSL web root folder is actually /var/empty.. so the commands you'd need is:

sudo ln -s /Shared\ Items/CasperShare /private/var/empty

More info: http://macmule.com/2012/04/11/error-the-package-does-not-appear-to-be-on-the-server-400-line-1-syntax-error/

Like
SOLVED Posted: by winningham.2

I would also mention, in the troubleshooting section, perhaps something about a "CasperUser" and that user's permissions to the directory if using HTTPS.

Like
SOLVED Posted: by antoinekinch

After creating the symlink, is it supposed to be effective immediately? My policies are still failing. Does the JSS need to be restarted?

Like
SOLVED Posted: by antoinekinch

The workaround is to set all of my policies to "Force Distribution Points to use AFP/SMB instead of HTTP". That got all of them working again.

Like
SOLVED Posted: by pickerin

My issue here is a bit more subtle. I'm getting the "line 1: syntax error near unexpected token ‘newline’" error from my Policy, but my HTTP distribution point works otherwise.

The issue is that in the Policy where I'm getting the error, I'm trying to distribute a .app bundle. Unfortunately, the web server sees .app files as just a directory, so when I request it from a client it is just providing a directory index of the contents of the app bundle.

Is it impossible to distribute a .app file from a Distribution Point over HTTP/S?

Like
SOLVED Posted: by bentoms

What OS is the DP on?

Like
SOLVED Posted: by pickerin

OS X

Like
SOLVED Posted: by leslie

does your policy include a script?

Like
SOLVED Posted: by donmontalvo

This worked for us on a 10.9.2 server running JSS 9.31, using Server.app default settings for SERVICES > Websites:

sudo ln -s /Shared\ Items/CasperShare/ /Library/Server/Web/Data/Sites/Default/CasperShare

Once we did that, we were able to download from a web browser using this URL:

https://server.domain.com/Packages/package.pkg

Then the only step left was to ensure packages had checksums (some didn't), else if you want to disable:

Settings > Computer Management > Security > Package Validation > Never (or) When Available

Like