software development


Hi All:

For all intent and purpose, I have an html file which should run javascript. The scripts are located in the same directory as the html file; however, the page will not load properly as the javascript files are not executed. The error.log indicates that the files are not found but the absolute path given in the error matches that of the pwd in the aforementioned directory.

I did a chmod -R on the directory so all of the js files therein are rwxrwxrwx. Should I change the owner on all the files as well? Could this be a security issue?

Any help would be appreciated?

Have a good one.

Toby Maurice


Can you post a link to the page that isn’t working?

As far as the CHMOD goes, you certainly shouldn’t need to do that. Directories are properly 755 and non-CGI files (HTML and JavaScript) 644. Using more expansive permissions like you’ve done most assuredly is a security issue.


I can’t imagine ownership being an issue. The ownership of the file should be your account name. As for the file attributes they will work with a 644 which is read only for owner, group and public.
Double check the html file making sure the filename is correct. Pay attention to the case of the filename. As filenames are case sensitive.
Your html tag should look something like the following:
< script type=“text/javascript” src=“subfolder/nameofscript.js” >< /script >
Note: nameofscript.js and NameOfScript.js are two different files. Also I placed spaces whereever ther is a greater or less than bracket so it would display in the forum.

My website


Firstly, thanks for the quick the responses.

As far as link:

you can log in as: username: demo, password: demo

select sco3000, then select Learning path link, then select Scotiabank Module 1.

At this point a course should launch, and you will notice that the js script components will not load.

This is a course module that I am trying to bring up into a leaning management system (dokeos) that I have installed. As ypu can see it will not load properly. From what I gather from the logs (error.log) it tells me that the files are not found. These files that are not being load are .js files.

This is a snippet of the file that should launch the java script files this a001titlemgr.html:

NOTE: all of the *.js, including this file (a001titlemgr.html) reside in the same directory, so it does make sence to me how they could not be loaded.

Title Manager body { background-color:#666699; }

So I am thinking it is has to attributed to a security issue, or a permissions issue. With respect to the latter, as mentioned I performed a chomod 777 on the directory and files therein. The name of the directory in question is: /home/gevc01/
courses/SCO3000/scorm/IP2-module_1_v03. But I guess this may be overkill as you guys suggested, so I will implemented the suggestions presented.

Also, here is a snippet from the error log:

[Thu Mar 20 04:31:26 2008] [error] [client] File does not exist: /home/gevc01/, referer: 1titlemgr.html
[Thu Mar 20 04:31:26 2008] [error] [client] File does not exist: /home/gevc01/ cofunctions.js, referer: 1titlemgr.html
[Thu Mar 20 04:31:26 2008] [error] [client] File does not exist: /home/gevc01/, referer: 1titlemgr.html
[Thu Mar 20 04:31:28 2008] [error] [client] File does not exist: /home/gevc01/ mages/SB-IP_HTML_background-A.gif, referer: 1_lesson_1_introduction_to_scotiabank_s_investment_platform_phase_2_module_overv iew.html

After a further look at the logs it looks like that it cannot find any files, even jpgs, so I don’t think it is no longer just a javascript issue.

Should I modify the “src” in the a001titlemgr?

Thanks for your help thus far guys.

Toby Maurice


silkrooster nailed it!

When I load that page, all of the scripts that fail to load have capital letters in their names. For instance, SCOFunctions.js has four captial letters at the front, APIWrapper11.js does as well, etc. However, on your page, all of these scripts are being looked for with entirely lower case letters (scofunctions.js, apiwrapper11.js, etc.). The fix for this is to either make all of the filenames lower case or to change your scripts to make them look for files of the correct case mixture.

Personally, I would make all of the filenames lower case, since that tends to be easier to work with in the long run.


On another note, if the problem was a problem with file permissions, you wouldn’t be getting HTTP/404 File Not Found errors. Permission mistakes come in the form of HTTP/403 Forbiiden errors sent to your browser.


Thanks guys.

It was a file naming convention thing.

Hope I can return the favor one day.

Have a good.

Toby Maurice