Can you post your script and just remove any sensitive data? Looks like either you uploaded the incorrect file or maybe didnt save it as a plain text file but its hard to know for sure with the given information.
Try running the script over AFP/SMB & not HTTP.
Wonder what app you used to edit the script, if it embedded some html and also saved it with windows rather then Unix line endings. Would suggest editing the script with something like TextWrangler.
Check the permissions of the file on the distribution point. Your clients are downloading it over HTTP and getting a 403 - Permission Denied web response from the web server servicing that point.
Hint: Open Terminal and type:
curl http://<serveraddressremoved>:80/CasperShare/Scripts/mountNetworkShare.sh
What you see in your Terminal window is exactly what the Casper client is receiving and attempting to execute.
OK, when I curl it I'm told that it has moved to https
When I curl the https url I get:
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Thanks to everybody for your help on this. Still don't know why it's flipping to https but switching it to ditto over AFP/SMB worked!
Scripts should run fine over HTTP. Let's address root cause and not a band-aid. What did you open/edit the script with and what server OS is your JSS?
As Jared says, my suggestion was merely a bandaid.
Next steps would be to test further to resolve the issue now you know the script is good & can be deployed.
Script was created and edited in textedit - converted to plain text.
Server OS is 10.7.4
Can you run the script locally, and get the proper http download?
What does the curl command above return to you?
The script runs fine locally.
Here's what I get when I try to curl the script:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://<serverremoved>/CasperShare/Scripts/mountNetworkShare.sh">here</a>.</p>
<hr>
<address>Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 Server at <serverremoved> Port 80</address>
</body></html>
Do you have mod_rewrite rules or anything in a .htaccess file? A 302 redirect is totally not a normal thing unless it was setup on purpose.
I'm also wondering if you've got some squirreliness up in your httpd.conf file. Can you paste it here?
Hi Everyone,
Just a thought here. On your web server (assuming Apache 2 here?) is the web docs folder linked to the actual CasperShare on the local server? When I set up HTTP distribution points I just usually use a symbolic link from the webdoc root in Apache to the actual local path on the Linux box where I typically set up my distribution points at.
Then, once that is verified, in the JSS > Settings > Servers > Distribution Point, under the HTTP tab ensure the context is set properly to the name of the share, in most cases called CasperShare.
I hope this helps,
Tom
Hi Tom,
This is a vanilla JSS build on a Mac OS X 10.7.4 server. I've checked that webDAV is not switched on for CasperShare and that the CasperShare alias is in /Library/Webserver/Documents (and links correctly!)
Regards,
Ger...
the CasperShare alias
Woah, there it is. Did you say alias? Like, you created an alias in the Finder? That's likely your problem right there. Use a symlink or better yet, change DocumentRoot so it's actually pointed at the CasperShare folder.
Sorry, syntax slip there. It's the symlink that was auto created by the JSS during setup. I haven't changed it, honest ;-)