# Can Anyone Please Help



## howard.a.s (Jul 22, 2005)

Not sure if my question should be in this section, but if I have posted in the wrong place, please feel free to move to the appropriate section.

I have been using my PC, running XP SP2, to FTP some files to a hosting account. As I don't understand very much about the type of set up that I need to carry out once the files are uploaded, I have been following written instructions that tell me to click on the CGI-BIN located inside the folder that I uploaded my files in, and to then click on the file named SET PERMISSIONS, in order to make the necessary adjustments.

With the folder and its files FTP'd to the host account, I have clicked on the CGI-BIN and then SET PERMISSIONS from within the FTP program, but get a windows message that says the .sh extension is not recognised, and that I should perform a web search in order to find software to open this file.

My question is, should this happen? I understood that my P.C should routinely be able to open files with the shell (.sh) extension, so can I assume that there is something wrong with my P.C?

I have looked around on the web for software to download to my P.C that may fix a possible problem reading the .sh extension, but can't really identify what I should download.

Can anyone here help? What could be the problem?

Any advice very gratefully received.


----------



## tomdkat (May 6, 2006)

Which FTP application are you using? It sounds like you are updating permissions on the wrong file. 

Peace...


----------



## Sequal7 (Apr 15, 2001)

What type of software does your host use? (Windows OS will not chmod) this could be your error, also, python scripts need to be added to the file list and PATHEXT for windows (I think that is the .sh extension is not recognised)

You could try to register the .SH extension as "to be handled 
by the python interpreter" and then add .SH to PATHEXT in windows.


----------



## howard.a.s (Jul 22, 2005)

Thanks for the advice. Unfortunately I haven't a clue about all of this, other than what I have been following from the educational video that I have been viewing.

Perhaps you can discover more by watching the video that explains how I should set up the site/s, which simply says to upload my site/s to my server, and then to make the necessary alterations.

Here is the link to the video:

http://adsenserealestate.com/are/apprentice/apprentice.html

I am using either NCH Classic FTP, or SmartFTP to upload. Do I need to use specific settings within the FTP program to make the changes?

When it comes to making changes to files such as setpermissions.sh, or other files such as config.php, why can't I do this using a program such as notepad, before I even upload, so the settings are already in place?


----------



## tomdkat (May 6, 2006)

Ok, attached is a screenshot of NCH Classic FTP. When you right-click on a folder, like cgi-bin, be sure to click on the SERVER side of the window display, as I've indicated in the screenshot. The screenshot doesn't show cgi-bin but I've indicated on which side of the window where you should be right-clicking.

If you right-click on the cgi-bin folder that appears on the right side of the NCH Classic FTP window, do you get a menu? If so, that menu should contain an option where you can change permissions. It might be listed as "chmod", possibly. Don't double-click anything on the right side of the window, only single click or right-click.

Peace...


----------



## howard.a.s (Jul 22, 2005)

Apologies for the delay in response. I had such a lot of work to complete over the weekend that I ended up leaving off early last night to take a break.

Thanks for your advice. 

I have opened NCH Classic FTP and opened the site that I transferred, which is one of those shown in the video, so the file and folder structure is exactly as described.

I locate the CGI-BIN folder and single right-click on it. I get a menu, but the only options shown in the drop-down are, OPEN, RENAME, DELETE, NEW FOLDER,

If I enter into the CGI-BIN, there is just one file named SETPERMISSIONS.SH, and if I right-click on this I get the option to DOWNLOAD, OPEN, RENAME, DELETE, NEW FOLDER.

Basically, I don't get all the menu options that are described in the video, or those that you speak of in your post.

I read some notes on the web a couple of days ago that said something about this being a problem when a registry error occurs on the P.C. Is this likely, and, if so, can I download any repair program from Microsoft to scan for/replace corrupted/lost entries?

Hope to hear from you.


----------



## tomdkat (May 6, 2006)

Ok, it looks like NCH Classic FTP does *not* support "chmod", or the command you will need to change permissions on the remote server. 

Try another FTP client, like CoreFTP or maybe CoffeCup FTP.

Peace...


----------



## Sequal7 (Apr 15, 2001)

To clear things up for me, your trying to set permissions on a file on your remote server or open it locally and edit it?

Filezilla FTP client is very similar to the NCH design one but it does support CHMOD. I reiterate however, your host has to support chmod commands otherwise your exercising futility (Windows hosts wont chmod no matter the client).


----------



## howard.a.s (Jul 22, 2005)

Thanks again.

I will certainly give the FTP client Core FTP a try. Is this a cut-down 'lite' version, or is it fully functional?

Here is the page that describes my hosting account functions:

http://www.110mb.com/plans.php

Perhaps you can tell me if CH-MOD is likely to be available, as I don't really know what to look for.

Please note: I have upgraded my account, so *all* the listed options other than the sendmail function, which I may upgrade if required, are now operational.

Incidentally, and further to my question yesterday, is there a reason why file settings such as SETPERMISSIONS.SH and CONFIG.PHP cannot be adjusted before upload, to save having to carry-out the adjustment process remotely? I don't really understand why this can't be done.


----------



## tomdkat (May 6, 2006)

howard.a.s said:


> I will certainly give the FTP client Core FTP a try. Is this a cut-down 'lite' version, or is it fully functional?


I don't know but for what you're doing (uploading files and changing permissions), it should be just fine. 

You could always use the command line FTP client that comes with Windows and issue the "chmod" command yourself but it looks like you're wanting to use a graphical FTP client, which is fine.



> Perhaps you can tell me if CH-MOD is likely to be available, as I don't really know what to look for.


They use Debian Linux servers so the ability to change permissions will be available on the server.



> Incidentally, and further to my question yesterday, is there a reason why file settings such as SETPERMISSIONS.SH and CONFIG.PHP cannot be adjusted before upload, to save having to carry-out the adjustment process remotely? I don't really understand why this can't be done.


The answer is simple: security. When you upload the files to the server, the *server's* security needs to be adjust appropriately. Any given file you upload won't be automatically executable since some files won't need to be and it's a big security risk. Besides, the server won't "know" which files need to be executable and which ones won't. It's possible to have non-executable files in the cgi-bin directory. The changes you're having to make are actually standard operating procedure. 

Peace...


----------



## tomdkat (May 6, 2006)

Sequal7 said:


> To clear things up for me, your trying to set permissions on a file on your remote server or open it locally and edit it?


He needs to set permissions on the remote server, per the instructions he's following.



> Filezilla FTP client is very similar to the NCH design one but it does support CHMOD. I reiterate however, your host has to support chmod commands otherwise your exercising futility (Windows hosts wont chmod no matter the client).


Since his site will be hosted on Debian Linux, he's covered. 

FileZilla is another FTP client I would also recommend but it can be a bit cumbersome. CoreFTP looked a bit more straight forward from what little time I've spent looking at it.

Peace...


----------



## howard.a.s (Jul 22, 2005)

O.K, I'll go get the software, install it and give it a whirl. Will let you know how I get on, and a great big thankyou for all your help so far.

Oh, by the way, the Coffee Cup Direct FTP client that I mentioned in an earlier post (not Coffee Cup Free FTP) says that it can actually edit webpages whilst on the server. Do you know if this is something that any freeware FTP client will do, or is it specific to Coffee Cup?


----------



## tomdkat (May 6, 2006)

howard.a.s said:


> Oh, by the way, the Coffee Cup Direct FTP client that I mentioned in an earlier post (not Coffee Cup Free FTP) says that it can actually edit webpages whilst on the server. Do you know if this is something that any freeware FTP client will do, or is it specific to Coffee Cup?


That's not a common function of FTP clients. Some will offer features like that to distinguish themselves from the competition but the primary use of a FTP client is to transfer files. I would focus on a FTP client that is easy for you to use that handles file transfers in a manner acceptable to you first and foremost. 

Peace...


----------



## tomdkat (May 6, 2006)

3D-FTP rocks! :up: I used to use it a lot and love it! 

Peace...


----------



## howard.a.s (Jul 22, 2005)

Hi all.

Just to let you know how I've got on, and to ask some further questions.

I downloaded Core FTP and used it to FTP into my 110mb.com account. Unfortunately, when I right-clicked on SETPERMISSIONS, and although more options were available in the drop-down list, CH-MOD/Set Permissions still wasn't offered.

After a bit of a rethink I tried using SmartFTP again, and when right-clicking on SETPERMISSIONS inside the CGI-BIN folder, the drop-down list offered me the option to CH-MOD/Set Permissions. BINGO!

Although the new window that opened when setting permissions looked a bit different to the one shown in the set-up video that I posted a link to in an earlier post (presumably because in the video they were using IpswitchFTP) all the options were there.

So, anyway, I proceeded to carefully set the permissions by typing-in the required 755 and saving.

Next, and as shown in the video, I went to the browser bar and entered the address of the website folder that I'm working on, followed by /cgi-bin/setpermissions.sh, which, according to the video, should then take me to a screen saying 'permissions have been set'.

Unfortunately, it took me to a screen saying that config.php required adjustment. The on-screen message told me what three numerals to enter into config.php.

I used the ftp program to navigate to config.php, and, using the right-click drop down menu and settings option, entered the numbers given (something like 666, but can't exactly remember without going back to take a look). I saved the changes and then tried the address bar url again.

This time I didn't get an error message, nor did I get the correct screen saying permissions have been set. Instead, a download window appeared on screen, inviting me to open/save/cancel, or search for a suitable program to open this file/page with.

I did save the file to my PC just in case, but, as this was the same effect that I got when trying to view the contents of the SETPERMISSIONS file previously, and before using SmartFTP (told you about this in an earlier post) I still wonder if my PC is missing some vital piece of registry/software that should allow me to view such files as standard. I also tried the url in various other browsers just to see if it made a difference, but still no good.

I am going to try this out on another PC, just to satisfy my curiousity as to whether my main PC has a problem.

Moving swiftly on. Despite not receiving the correct message on screen, I decide to proceed by taking the next step on my instuction list.

I typed the name of my site/admin in to the address bar and actually arrived at the admin log-in screen. I entered the login details supplied in my instructions and gained access to the admin area, where all settings can be made.

*Problem is, I'm still a concerned.

As you know, this is a site that includes Google Adsense adverts, and in order to have any clicks diverted to my Adsense account, everything needs to be set-up and working properly. In the admin area I need to enter my Google Adsense PUB number, together with the numbers of any other relevant affiliate schemes of which I am a member. 
Obviously, entering these numbers is really easy. But I'm worried that if all the other site settings are not 100% correct, this may affect the ability of the site to do its job properly.

Despite the fact I don't seem to see the 'permissions have been set' message, and based upon the fact that I can now gain access to the admin area, would you say that everything is now working correctly? I mean, if permissions were not set properly, would the admin page even be accessible? *

Whilst here, I'd just like to pick-up on another point you made in an earlier response.

You mentioned how it's important that configuration adjustments are made when pages are actually on the server, and not before upload, otherwise changes may not be recognised.

Thing is, I have sites that I uploaded to another host, on which adjustments were made BEFORE upload (but only to my Google Adsense code entry). Would this matter?

These sites are still php constructed, but instead of having to enter all details in an admin area, changes to Google Adsense code is made in a folder called INCS - the files inside being ads-top.inc, ads-bottom.inc, rss.inc. These are basic notepad-type files. There is no CGI-BIN or ADMIN folder included with these sites.

Thing is, it's O.K to follow instructions, but if the sites aren't set-up properly due to my lack of knowledge, then I may as well not have put them up on the web at all!

Any feedback gratefully received.


----------



## Sequal7 (Apr 15, 2001)

I doubt there is any reason to be concerned, since all your creating is referral links to the other "affiliate schemes" you have. If someone clicks the link and your referral is incorrect than it will just load their default sign up page. They don't need permissions to be set.
You can check your referral links to make sure they work after you set them, that would be the smart thing to do.

About server permissions, scripts uploaded to your server need to be set when they are in the servers folder. If you want to avoid this you could set the folders value (NOT THE ROOT FOLDER) 777 or 667 then each file you upload the permissions should be inherent to the folders permissions.

Don't get too much into the permissions, it is only for scripts that need to write to files on the server, or execute files, not for the other files. You may need to chmod 1 or two script files and that is all.


----------



## tomdkat (May 6, 2006)

howard.a.s said:


> I downloaded Core FTP and used it to FTP into my 110mb.com account. Unfortunately, when I right-clicked on SETPERMISSIONS, and although more options were available in the drop-down list, CH-MOD/Set Permissions still wasn't offered.


Ok, which options were offered?



> After a bit of a rethink I tried using SmartFTP again, and when right-clicking on SETPERMISSIONS inside the CGI-BIN folder, the drop-down list offered me the option to CH-MOD/Set Permissions. BINGO!


Great! 



> Next, and as shown in the video, I went to the browser bar and entered the address of the website folder that I'm working on, followed by /cgi-bin/setpermissions.sh, which, according to the video, should then take me to a screen saying 'permissions have been set'.
> 
> Unfortunately, it took me to a screen saying that config.php required adjustment. The on-screen message told me what three numerals to enter into config.php.


Did it say the *permissions* of config.php needed adjustment or a number need to be put _inside_ config.php?



> This time I didn't get an error message, nor did I get the correct screen saying permissions have been set. Instead, a download window appeared on screen, inviting me to open/save/cancel, or search for a suitable program to open this file/page with.


You were prompted to download setpermissions.sh? If so, that means something is wrong on the server side. When you point your browser at [website domain]/cgi-bin/setpermissions.sh, that script should actually execute on the server. I'll watch more of the video to see what is supposed to happen. 

EDIT: Ok, I watched more of the video and have a better understanding of what you're talking about. You probably had to update the permissions of config.php when the setpermissions script ran the first time. Please post which file you were prompted to download when you ran setpermissions the second time.

Peace...


----------



## howard.a.s (Jul 22, 2005)

As you read, Smart FTP does allow me to set permissions from the drop-down list, so that was O.K. I also downloaded and installed Filezilla, as someone suggested, but haven't tried it out yet.

When the message came up on screen, it said something like the wrong number was entered in config.php, and it told me what number I should enter. So, off I went, found the file, entered the suggested number and when I went back to the first screen the error message had gone and I was prompted to download the set permissions file, instead of seeing the message (as described in the video) that permissions had been set. Anyway, I was then allowed to access the admin area, which I did. So, from this, I assumed that everything was O.K? But wasn't sure! 

Basically, this uncertainty over not seeing exactly the same messages and screens as shown in the video was what prompted me to ask the most recent questions, as I really just wanted to understand whether permissions were just something that stopped the entire site from being accepted by the server, or whether incorrect permissions would likely affect the site in other ways. For instance, stop adsense ads from working, despite my adsense I.D being entered correctly.

Moving on, I also asked about some other sites that I have, in which my adsense I.D had to be entered in files contained within a folder called 'includes'. The files have a .ini extension (if my memory serves me correctly). Details that I followed when adding my I.D into these files said to do this before upload. My question is, would this have worked?

I mean, I know that my adsense pub I.D is saved in each relevant file, but would this information be 'seen' by the server, because I didn't make those changes when the files were actually on the server? Or does this only apply to files with the .php extension?

Here's what also worries me. I have another existing website that, since last autumn has had three adsense ad units placed on its homepage. O.K, so the site ain't Amazon, but it does get traffic and yet, according to my Google account, not one click has been registered, not one penny earned. Apart from this site, I have lots of other pages with adsense units installed and not one has registered a single click in months. Strange?

Again, according to my Google account I have no blocked urls, so I must be staying within the rules, which is always my intention.

So, why no clicks?

Guess I'm paranoid, but there seems little point in uploading adsense units if they aren't going to prove even slightly worthwhile.

What I don't get is why Google don't have a system whereby I could click on my own ads just to make sure they work. Obviously this is not allowed, but it would be good to remove the uncertainty of not knowing.

Any feedback gratefully received.


----------



## howard.a.s (Jul 22, 2005)

Further to your question:

_Please post which file you were prompted to download when you ran setpermissions the second time._

Firstly, after setpermissions was adjusted to the number shown in the video, I was then instructed to set the config.php file to 666 (think it was previously set to 5 something).

When going to cgi-bin/setpermissions using the browser (as shown in the video), the prompt is to download setpermissions.sh, which it says is an unknown filetype - 704 bytes.

Hope that helps.


----------



## tomdkat (May 6, 2006)

howard.a.s said:


> Firstly, after setpermissions was adjusted to the number shown in the video, I was then instructed to set the config.php file to 666 (think it was previously set to 5 something).


Ok, that's setting the permissions of config.php.



> When going to cgi-bin/setpermissions using the browser (as shown in the video), the prompt is to download setpermissions.sh, which it says is an unknown filetype - 704 bytes.
> 
> Hope that helps.


Ok, this is not good. That means the server isn't running the script but actually trying to send the script file itself to your computer. Since you actually ran setpermissions successfully once already, there is a chance it did everything it needed to do, outside of you having to update the permissions on config.php manually. If this is the case, you shouldn't need to run setpermissions again.

If the site does what you want/need, you're probably in good shape.

Peace...


----------



## tomdkat (May 6, 2006)

howard.a.s said:


> As you read, Smart FTP does allow me to set permissions from the drop-down list, so that was O.K. I also downloaded and installed Filezilla, as someone suggested, but haven't tried it out yet.


Yep, but I was asking which menu options CoreFTP provided to you when you right-clicked on setpermissions.sh. 



> When the message came up on screen, it said something like the wrong number was entered in config.php, and it told me what number I should enter. So, off I went, found the file, entered the suggested number and when I went back to the first screen the error message had gone and I was prompted to download the set permissions file, instead of seeing the message (as described in the video) that permissions had been set. Anyway, I was then allowed to access the admin area, which I did. So, from this, I assumed that everything was O.K? But wasn't sure!


I'm not sure either. The downloading of setpermissions.sh isn't a good sign, but if the site generally works you might be ok.



> Basically, this uncertainty over not seeing exactly the same messages and screens as shown in the video was what prompted me to ask the most recent questions, as I really just wanted to understand whether permissions were just something that stopped the entire site from being accepted by the server, or whether incorrect permissions would likely affect the site in other ways. For instance, stop adsense ads from working, despite my adsense I.D being entered correctly.


The impact of correct file permissions will vary upon the nature of the files in question and how they are used. For security reasons, a script-based web application (like a PHP web mail client like SquirrelMail) will refuse to run if certain config files are present or have incorrect permissions. This is to prevent hackers from getting access to your private config data and settings and exploiting your site. That's just one example. Obviously, what you're installing wanted certain permissions set so it could function correctly (or at least as intended) but we're not 100% sure if that's the case right now. If the site seems to behave the way you want it to, chances are all is well even with the setpermissions.sh downloading issue.



> Moving on, I also asked about some other sites that I have, in which my adsense I.D had to be entered in files contained within a folder called 'includes'. The files have a .ini extension (if my memory serves me correctly). Details that I followed when adding my I.D into these files said to do this before upload. My question is, would this have worked?


These kinds of changes should be down before uploading the files since you won't have login access to the server to update them on the server. These kinds of changes are different than setting server-side file permissions, which can only be done _after_ the files have been uploaded to the server.



> Here's what also worries me. I have another existing website that, since last autumn has had three adsense ad units placed on its homepage. O.K, so the site ain't Amazon, but it does get traffic and yet, according to my Google account, not one click has been registered, not one penny earned. Apart from this site, I have lots of other pages with adsense units installed and not one has registered a single click in months. Strange?


Not necessarily. _Just because_ an ad is on your site that doesn't mean someone will click it.  Also, some people might have ad blockers installed in their browsers which might be blocking your adsense ads. If you give me the URL of a site that isn't getting any adsense clicks, I'll click and ad and you can see if it was properly registered with Google. 



> What I don't get is why Google don't have a system whereby I could click on my own ads just to make sure they work. Obviously this is not allowed, but it would be good to remove the uncertainty of not knowing.


I guess it's just the nature of the "beast", how the ads work, etc.

Peace...


----------

