The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 21 posts ] 
Author Message
PostPosted: Thu Jan 01, 2009 2:52 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
Version of Joomla: Joomla_1.5.8-Stable-Full_Package
OS: Linux
Server: Loaded on a dedicated server but I am using shared hosting. However the Joomla and the database are individual for each domain.
Domain: photoventure.org
Location of Joomla: http://www.photoventure.org/content

I have installed Joomla before and on the same server but I have never had this issue. When I try to change global configuration I receive the following error message when configuration.php is set to 644 or 444.

An Error has occurred! Unable to open configuration.php file to write!

When I enable FTP I receive the following error message.

JFTP::write: Bad response
An Error has occurred! Unable to open configuration.php file to write!

If I change the configuration.php permissions to 777 I get the following message.

JFTP::write: Bad response
An Error has occurred! Unable to open configuration.php file to write!

BUT, if I disable the FTP and keep the permissions at 777, I get the following message.

The Global Configuration details have been updated.

SO, my question, isnt keeping the configuration.php at 777 a big no no?! I would think this would allow others to not only read but write and execute my configuration file.

I would like to set this up with the most security as possible, but I do not want to keep changing my configuration.php to 777 and then back to 444 or 644 when I am done.

Any help you can provide would be greatly appreciated.

Kim Huff

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Last edited by kimhuff on Fri Jan 02, 2009 8:27 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 4:11 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14715
Location: Kent, England
Yes it is a big "no no"! Make sure the file is set to a maximum of 644 and ideally 444.

Edit your configuration.php file ftp client and remove the ftp settings that are in there and make sure the ftp enabled setting is set to no.

Make sure this is replicated in Global Configuration

If you require the FTP settings active ensure you are entering the correct values for your FTP connection and that you are using the correct case for passwords. These are typically the same settings you created within your FTP client for access to the server.


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 4:35 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
Humvee,

Thank you for responding to my post so quickly.

Although I have done this before, I wanted to go through the motions one more time.

1. I made sure the chmod was set to 444.
2. I deleted the old configuration.php file on the server.
3. I changed the ftp info so they were all blank and changed the var $ftp_enable to 0.
4. I went into the Global Configuration and tried to save and received the "An Error has occurred! Unable to open configuration.php file to write!" message.
5. I went back into the configuration.php file and input the exact same FTP information I have listed in my WSFTP program and changed the enable variable to 1 and now I receive "JFTP::write: Bad response An Error has occurred! Unable to open configuration.php file to write!" messages.

I know the user name and password is correct because I have it in my password administrator program and I simply copied pasted it into the proper variables. This is also how I setup my FTP program which does work.

The only thing I am not sure about is the root folder (/content) and the host which is currently set to 127.0.0.1.

I figure there has to be something minor I am missing since others are obviously able to make it work.

Thank you again for your assistance,

Kim

EDIT: I forgot to mention that after changing the ftp info in the config file, it was accurate when I went into Global Configuration.

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 5:27 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
Well, I think my problem is getting worse. I just tried to install a template and that too would not install. I received the following message. Warning! Failed to move file.

I am assuming the two problems are related.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 5:51 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Nov 10, 2006 7:05 pm
Posts: 572
Location: Detroit, Michigan, USA
Kim.. I'm working through same problem. And I don't have an answer either.

I just wanted to let you know you were not alone !


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 5:54 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Nov 10, 2006 7:05 pm
Posts: 572
Location: Detroit, Michigan, USA
humvee wrote:
Yes it is a big "no no"! Make sure the file is set to a maximum of 644 and ideally 444.

Edit your configuration.php file ftp client and remove the ftp settings that are in there and make sure the ftp enabled setting is set to no.

Make sure this is replicated in Global Configuration

If you require the FTP settings active ensure you are entering the correct values for your FTP connection and that you are using the correct case for passwords. These are typically the same settings you created within your FTP client for access to the server.


Could you please detail this process.. bite size pieces please ! :-)


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 7:22 pm 
Joomla! Intern
Joomla! Intern

Joined: Sun Jul 06, 2008 2:44 am
Posts: 52
All,

You windows users just do not understand file permission the look like this:
Code:
drwxrwxr-x 2 ndavis ndavis 4096 2008-11-20 08:22 .
drwxr-xr-x 7 root   root   4096 2008-12-02 12:55 ..
-rw------- 1 ndavis ndavis  666 2008-12-11 14:51 .bash_history
-rw-r--r-- 1 ndavis ndavis  220 2008-11-19 12:05 .bash_logout
-rw-r--r-- 1 ndavis ndavis 2298 2008-11-19 12:05 .bashrc
-rw-r--r-- 1 ndavis ndavis  566 2008-11-19 12:05 .profile
-rw-r--r-- 1 ndavis ndavis    0 2008-11-20 08:22 .sudo_as_admin_successful


Columns are explained like this:

1. 'd' denote a directory, '-' denotes a file,
2. 'r' is read for owner,
3. 'w' is write for owner,
4. 'x' is execute for owner,
5. 'r' is read for group,
6. 'w' is write for group,
7. 'x' is execute for group,
8. 'r' is read for public or anonymous user,
9. 'w' is write for public or anonymous user,
10. 'x' is execute for public or anonymous user.

the chmod command is:

chmod ugp file

where:

u ==> binary for owner,
g ==> binary for group,
p ==> binary for public,

binary equiv:
Quote:
400 -r-------- read by owner
040 ----r----- read by group
004 -------r-- read by anybody (other)
200 --w------- write by owner
020 -----w---- write by group
002 --------w- write by anybody
100 ---x------ execute by owner
010 ------x--- execute by group
001 ---------x execute by anybody
4000 s--------- suid
2000 s--------- sgid
1000 t--------- sticky


you add the binary values to set combinations:

so chmod 775 equals rwx for owner, rwx for group rx for public

so chmod 444 equals r for owner, r for group r for public

so chmod 664 equals rw for owner, rw for group r for public

so chmod 665 equals rw for owner, rw for group rx for public

Hope you get it now, and yes this is why Linux/Unix is much more secure that Windows.

OMR


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 7:42 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Nov 10, 2006 7:05 pm
Posts: 572
Location: Detroit, Michigan, USA
Okay.. I got all that.. and I was on the correct page.

I have the config.php file set to 644

Image

It still says it is unwritable ?


Top
 Profile  
 
PostPosted: Thu Jan 01, 2009 7:59 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
OMR,

I am running on a Linux server and do understand file permissions but I have never had it spelled out that way. Thanks for the info, I will be saving that in my helpful Linux folder. ;)

Do you have any idea why I am having so many other problems. I was just reading over the installation manual again and it said...

Quote:
Caution: Do not use PHP 4.3.9, PHP 4.4.2 or PHP 5.0.4; these releases have known bugs that will interfere with the installation of Joomla!


I am using...

PHP 5.0.4
Database: MySQL 4.1.20
Apache: 2.0.54 (Fedora)

Could some of this be my problem? If so, I need to find a work around because I have other stuff on my server that cannot work with the latest version PHP.

Thanks,

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Fri Jan 02, 2009 4:37 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
I had no problems installing Joomla 1.x on my server some time ago.. matter of a fact I installed and had the site up and running in a weekend.

I am really trying to get this other site done but could really use some help. Does anyone have any suggestions? I am reinstalling Joomla now in hopes that this time it will work better.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Fri Jan 02, 2009 5:00 am 
Joomla! Intern
Joomla! Intern

Joined: Sun Jul 06, 2008 2:44 am
Posts: 52
K,

Dang man, you have RH, if you were running Ubuntu, update of you AMP code libs in the kernel would be simple, with their "Synaptic Package Manager".

Not so with RH, it can be done, but you will have to pay your dues in research to get it done. Look out there and see if there are any RPM updates for the AMP modules in question.

Also I found about six months ago that some of the PHP 5.0.4 problems were not the release but the .so and other libs. I had to download previous versions and install over the existing files; but sorry forgot the details on this. I do remember on my WAMP box I also had to replace one of the .dll lib files, but forgot which.

I this your personal box or company? If personal I would suggest replacing the Fedora with Ubuntu, sooooo much easier to use and config.

If not man, research because you can fix it.

Oh hey see your using some of the tools, and seems your are enjoying it.

Cheers!

OMR

PS.

Oh man I forgot something. If you are not logged in as SU on some systems you can not issue chmod or chown commands. Do not know how that is on RH, but on Ubuntu and other Debian releases you just command line to "sudo su" re-enter your pwd and then run the commands.

OMR


Top
 Profile  
 
PostPosted: Fri Jan 02, 2009 5:10 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
OMR,

Well, I must admit, some of what you said was over my head. My linux is not the best but I keep collecting as much helpful info as I can as to learn more.

I am running Fedora Core and it is on a dedicated server located in Austin TX supplied by Hostway. I am also running Plesk which I have seen others have issues with.

I need to be careful about what changes I make because I have about 26 domains on my server and one that is rather busy with a very active store.

The new install is done and I can view the installed sample data and log into the admin section but the permissions are still having problems. When I go to Help/SystemInfo/Directory Permissions all are unwritable. If this is not going to be possible on this server then I am seriously thinking about moving all my domains. I would rather NOT do that since it would be a huge hassle.

Any help you can give me would be greatly appreciated.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Fri Jan 02, 2009 5:42 am 
Joomla! Intern
Joomla! Intern

Joined: Sun Jul 06, 2008 2:44 am
Posts: 52
K,

Do you have test environ on this machine or do you use another box for test?

I build Linux boxes and just rescued another company on RHE4 by giving them test Ubuntu 7.10 (older version) server. They did not want much on the box so solution was cheap, well under $ 2K.

Usually I don't build anything under $5K, as I build my boxes with full R1,R5 hot swappable disk combo and dual hot swap power supplies.

Since avg uptime on Linux box is 10 yrs and only go down for hardware, using redundant hot swap products takes failure down to just Motherboard, CPU, or RAM, which usually extends uptime by 5-10 years.

You can build cheap test server box with any scrap PC someone else in your company doesn't want especially since server version is command line only, so resources/capability can be less than optimum and still get good performance. Main thing is RAM, 1-2G is good for full performance.

Anyway Ubuntu Server installs almost seamlessly, just a couple minor tweaks to set your static IP, needed for a web server.

You have to search the Ubuntu site as the server version is not readily available on the main download page.

Cheers!

OMR


Top
 Profile  
 
PostPosted: Fri Jan 02, 2009 8:26 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
OMR,

I do not have a test environment. I know I need one if I want to learn more about Linux. I have a PC here I have thought about using as a Linux server but I wouldnt know the first thing about setting one up.

And, to be honest, I dont really make much of anything on hosting. I do it because I have several website I take care of and would rather have them all under the same environment that I am used to working with than several different companies. So for me to spend even $2k on a server that will not bring me in much profit, I just cant see making that kind of an expense.

Good News... my problem is now fixed. I called Hostway (darn good company by the way) and they helped me figure out what the problem was. Basically they had to make the following changes on the server.

"add the ‘apache’ user to the ‘psacln’ group"
"chmod -R g+w httpdocs"

So, if anyone out there is using Plesk, you might want to read the following sites:

http://forum.swsoft.com/showthread.php?t=49426
http://www.dustinsdesign.com/perfect-pe ... and-plesk/
http://rackerhacker.com/2007/05/20/joom ... rmissions/

A variation of the last one is what was used to fix my problem.

Thanks everyone.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 4:44 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Nov 25, 2007 6:35 pm
Posts: 2
Hmm, I just had a very similar problem, but found another solution.

It was a fresh installation of Joomla 1.5.8 on a local host (running Ubuntu linux). I wanted to do all updates using the FTP layer just to test the whole thing, this is a test installation before uploading to the final production server. The error messages were the same as reported by kimhuff.

Root cause of the problem: the owner of "configuration.php" was www-data (the user ID of the web server). All other files and the joomla directory itself were owned by the local user.

Solution: manually connect with ftp, get the existing configuration.php, delete it, upload a new configuration.php. Verify that this configuration.php is publicly readable (chmod go+r).

This looks like a bug in the installer to me. If during installation ftp access is chosen, the installer should also use ftp access to create the initial configuration.


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 4:59 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Dec 20, 2007 9:38 pm
Posts: 55
No, that is not an installation bug but a configuration problem on your host. Re uploading the config file is not needed, just change the ownership with chown or change the permissions to 777.

_________________
http://www.windsurf.me.uk


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 5:09 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
I actually found that my problem was a little more deep than the config.php file. When I went into Help/System Info/Directory Permissions all items were listed as unwritable. I dont remember who had ownership at this point but it needed to be set to apache. Were you installing on a system running Plesk rdebaene?

I work on another Joomla site that resides on a HostMonster server and I had absolutely NO problems installing on their server. I figured it had something to do with the way the Plesk / Fedora Core environment handles the way folders and permissions are created on the server. When I uploaded all of the files for Joomla it was done through my FTP which had a different user name and group permission. Yet when HostMonster did the install I merely clicked on a link, answered a few questions and boom the install was done.

To be honest, I am very green when it comes to Linux. I know enough to be dangerous... but I am learning. Maybe now that some of my family obligations are gone I will be able to learn some more.

Thanks again for all those that did try to help me.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 5:42 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Dec 20, 2007 9:38 pm
Posts: 55
If you have access run the command chown -R www-data.www-data /path to your domain

The -R is the switch for recursive meaning that all subdomains will be affected.

The www-data is usually the group name setup by apache as the default for web access. Before the . is owner and after the . is the group.

Finally we have the path to the directory you want affected. so put the correct path there and you are set to go.

_________________
http://www.windsurf.me.uk


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 5:46 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
I was fortunate. I found some of the research and what needed to be done, but I was afraid I would screw something up so my hosting company went in there and made the changes for me.

So far, all seems to be working for me.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 6:00 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Nov 25, 2007 6:35 pm
Posts: 2
kimhuff, I was running on a local system, without Plesk. But the production server, the one I'm going to use when the site is finished, is a Plesk site. That was the reason I was trying to change the configuration using the ftp interface, to simulate as good as possible on my local host the final configuration (that is: only access using plesk file manager + FTP, and FTP saves files with a different user than the web server).

And indeed, it seems that changing the configuration can be done using the FTP interface (the web server doesn't need write access to configuration.php), but for installing components, write access to the folders mentioned in Help|System Info|Directory permissions still seems necessary.

phil104, with Plesk it is (as far as I know) not possible to directly run shell commands. The only method to change file permissions is by clicking each folder in the file manager.


Top
 Profile  
 
PostPosted: Sat Jan 03, 2009 6:45 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 16, 2007 6:16 am
Posts: 123
Quote:
phil104, with Plesk it is (as far as I know) not possible to directly run shell commands. The only method to change file permissions is by clicking each folder in the file manager.


I think you are correct about this because my permissions were changed on the command line in root access.

Kim

_________________
Thank you,

Kim Huff
"Size matters not. Look at me. Judge me by my size do you?" ~ Yoda, Star Wars Empire Strikes Back


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group