AR_1986 Posted June 9, 2009 Share Posted June 9, 2009 Hi, im trying to get my oscommerce site running but im having a few annoying issues. I am currently using WS_FTP client to upload the files to the htdocs directory, although i have tried filezilla, ftpcore aswell. i have installed the site but i keep getting the following error at the top of the site: - Warning: I am able to write to the configuration file: /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. I have tried virtually everything i can think of to change the file permissions for the following but it never works: - catalog/admin/includes/configure.php catalog/includes/configure.php i look for both files, i right click on them, click properties and change the numeric value to whatever, i've tried them all. I've tried all different file permissions aswell, 644, 777, 755 and at fist glance, this appears to work but no matter what nothing will get rid of that error message when i load www.mywebsite.com/index.php. It says it has changed them on the file properties and proceeds to upload them to the server but when i double check the browser the same error appears. Is it a problem with the configure.php file? because no matter what ftp client im using it makes no different, changing the file permissions does nothing. I have contacted my hosting provider and they said 'Thank you for your query This is something you will need to resolve by using SSH. You cna change the permissions or remove the warning from your contents. Unfortunately we do not provide any support for your design or website contents/scripting directly.' the problem is i have no idea what that is or how to do it? I've searched it on google and found alot of people who have the same problem but there doesn't seem to be a solution. has anyone managed to solve this problem? Is there something im doin wrong. Any help would be greatly appreciated, im pretty new to PHP and im struggling already. Many, many, many many thanks Quote Link to comment Share on other sites More sharing options...
ldougherty Posted June 9, 2009 Share Posted June 9, 2009 I've seen this before, set the file to 444 or 400 for that matter as you will not be writing to it from any user. That should clear up the message. Quote Link to comment Share on other sites More sharing options...
AR_1986 Posted June 9, 2009 Author Share Posted June 9, 2009 I've seen this before, set the file to 444 or 400 for that matter as you will not be writing to it from any user. That should clear up the message. Hey idougherty, cheers for the reply, i tried it but got nothing. I tried changing both permissions to 444 and 400 but for some reason by the time i have changed the permission of the second configure.php in /htdocs/admin/includes/configure.php, the first in /htdocs/includes/configure.php has reverted back to its original permission. /htdocs/admin/includes/configure.php reverts back to 604 /htdocs/includes/configure.php reverts back to 644 I launched the browser but the error message is still there. 'Warning: I am able to write to the configuration file: /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. Quote Link to comment Share on other sites More sharing options...
AR_1986 Posted June 9, 2009 Author Share Posted June 9, 2009 I've seen this before, set the file to 444 or 400 for that matter as you will not be writing to it from any user. That should clear up the message. Hey idougherty, cheers for the reply, i tried it but got nothing. I tried changing both permissions to 444 and 400 but for some reason by the time i have changed the permission of the second configure.php in /htdocs/admin/includes/configure.php, the first in /htdocs/includes/configure.php has reverted back to its original permission. /htdocs/admin/includes/configure.php reverts back to 604 /htdocs/includes/configure.php reverts back to 644 I launched the browser but the error message is still there. 'Warning: I am able to write to the configuration file: /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. omg...i just double checked on my webhost ftp and its not even changing the permission when it says it is. its says: - File /htdocs/includes/configure.php was successfully chmodded to 444 All the selected directories and files have been processed. then as soon as i refresh the page or log out the configure.php files revert back to 644 and 600. what the hell is going on lol Quote Link to comment Share on other sites More sharing options...
ldougherty Posted June 10, 2009 Share Posted June 10, 2009 Is it PHP under windows or PHP under Linux? If you are running a Windows server then obviously these chmod functions would not work. Do you have shell access, its easier to do this via command line. Quote Link to comment Share on other sites More sharing options...
AR_1986 Posted June 10, 2009 Author Share Posted June 10, 2009 Is it PHP under windows or PHP under Linux? If you are running a Windows server then obviously these chmod functions would not work. Do you have shell access, its easier to do this via command line. yeah i have the server on linux. Im not to sure about the shell access, what does that mean? im fairly new to php. how would i go about doing that? thanks Quote Link to comment Share on other sites More sharing options...
trq Posted June 10, 2009 Share Posted June 10, 2009 If your host told you you need to do it via ssh then thats what you'll need to do. Download Putty which is an SSH client for windows (I'll assume your using windows). Login to your account using the details provided to you by your host, locate the file in question (you can use cd dirname to change directories) then issue the chmod command.... chmod 644 filename Quote Link to comment Share on other sites More sharing options...
AR_1986 Posted June 10, 2009 Author Share Posted June 10, 2009 If your host told you you need to do it via ssh then thats what you'll need to do. Download Putty which is an SSH client for windows (I'll assume your using windows). Login to your account using the details provided to you by your host, locate the file in question (you can use cd dirname to change directories) then issue the chmod command.... chmod 644 filename I downloaded the putty.exe client and run it, it then proceeds to ask me for the hostname, is this is ssh.mywebsite.co.uk hostname? or another? I tried it with that and selected ssh under connection type but when i click open, it asks me to login as: what is it asking for? I dont have a particular username for it? i tried a couple different names to which it asked me for example@ssh.mywebsite.co.uk's password: but when i enetered the password i specified in my webhost control panel it says access denied Quote Link to comment Share on other sites More sharing options...
trq Posted June 10, 2009 Share Posted June 10, 2009 You'll need to speak to your host. When is says login as:? its asking for your username, then, it will ask you for your password. Quote Link to comment Share on other sites More sharing options...
AR_1986 Posted June 10, 2009 Author Share Posted June 10, 2009 You'll need to speak to your host. When is says login as:? its asking for your username, then, it will ask you for your password. Hi, i go the details i needed and im logged in. I've figured out how to get to the folder i need (only just) using some basic commands and im now at /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes but how would i now change the file permission of configure.php, what command do i type to open it? if i type the command ls i can see it but i dont know what to do next. thanks. Quote Link to comment Share on other sites More sharing options...
AR_1986 Posted June 10, 2009 Author Share Posted June 10, 2009 You'll need to speak to your host. When is says login as:? its asking for your username, then, it will ask you for your password. Hi, i go the details i needed and im logged in. I've figured out how to get to the folder i need (only just) using some basic commands and im now at /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes but how would i now change the file permission of configure.php, what command do i type to open it? if i type the command ls i can see it but i dont know what to do next. thanks. omg, i finally sorted it! thankyou so much ! All i need help with now is figuring out what the correct chmod command line for putty would be if i wanted the file permission for confiugre.php to be read only to all. 444. thanks would this be right? chmod a-r configure.php Quote Link to comment Share on other sites More sharing options...
trq Posted June 11, 2009 Share Posted June 11, 2009 You'll need to speak to your host. When is says login as:? its asking for your username, then, it will ask you for your password. Hi, i go the details i needed and im logged in. I've figured out how to get to the folder i need (only just) using some basic commands and im now at /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes but how would i now change the file permission of configure.php, what command do i type to open it? if i type the command ls i can see it but i dont know what to do next. thanks. omg, i finally sorted it! thankyou so much ! All i need help with now is figuring out what the correct chmod command line for putty would be if i wanted the file permission for confiugre.php to be read only to all. 444. thanks would this be right? chmod a-r configure.php No. chmod 444 configure.php And its the Linux shell your in (likely Bash) not putty. Putty is just a client to log you in with. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.