params.ini unwritable ...

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

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.
Locked
igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

params.ini unwritable ...

Post by igrimpe » Wed Feb 20, 2008 11:35 am

Don't know if the right forum, so pls move somewhere else if necessary.

Playing around with J1.5 for some time now, I tried to use a new template (ja_purity).
Upload, unpack, set default -> working
Now wanted to change some settings/params to see the differences. Changed Menu from JaMoo to Suckerfish, press "Apply": params.ini is unwritable. Login via ssh, file permission is r-xr-xr-x (User and Owner are ok, because PHP is running as cgi, so now probs from this side).
CHMODed to 664 (checked and ok), back to Admin menu, click "Apply" and ... still/again unwritable. Checked file permissions and it's 555 again! WTF? TOUCHed "a.ini" which leads to correct 664. So the (Linux)Server doesn't seem to be the problem.
The interesting part: All changes ARE applied to (the new created) params.ini.
I tried a little fopen("test",w); in that directory (templates) and got a nice empty "test" file with 644 rights.

How comes?

EDIT
-> "How" comes is solved now:
In administrator\components\com_template\controller.php
I found

Code: Select all

// Try to make the params file writeable
			if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0755')) {
				JError::raiseNotice('SOME_ERROR_CODE', 'Could not make the template parameter file writable');
			}

			$return = JFile::write($file, $txt);

			// Try to make the params file unwriteable
			if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0555')) {
				JError::raiseNotice('SOME_ERROR_CODE', 'Could not make the template parameter file unwritable');
			}
Obviously I never noticed that the content of the file DID change.

May I ask for a change in the next release?
Make "File is Unwritable" in GREEN, because this is NO Error and make "is Writable" RED, because that IS an error ... ;) Usually one expects "green" to say "Everything is ok, pls don't worry" while "red" usually means "oops, might be a good idea to do something quickly".
May I ask why "555" was chosen? Makes sense for a folder maybe but not for an .ini file ...

User avatar
Infopro
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Nov 06, 2005 11:55 pm
Location: Thugz Mansion

Re: params.ini unwritable ...

Post by Infopro » Wed Feb 11, 2009 7:33 pm

Why in the world would this file be changing file permissions to 555? Who the heck uses perms of 555 to "protect" a file?

Hey, Joomla Developers, do you have any clue at all how many people have run into problems with this crap?

How about this, do you have any idea how many people on your own forums have problems with this crap that you have not assisted to solve the problem?

Here's one more, wonder why these forums keep shutting down from all the traffic? It's because you don't answer questions (or solve problems you created, like this one) here on your own forums to help solve users problems, LIKE THIS STUPID PROBLEM!

It is NOT because Joomla is so popular. It's because you leave crap like this unanswered.

igrimpe (thank you for your post!) posts the details to the file, I read it, I changed the 555's located in that file (there are several places) to 644 and hey, guess what? The problem is solved.

But this thread has NO REPLIES! Not a one. Why is that?

It's not the color of the words unwritable that is the problem, its the Joomla developers nifty idea of setting file perms to 555, ON SEVERAL FILES!

100's if not 1000's of posts on this forum (and others, google this problem to see) on this very topic and not a single response to any of them that is correct or solves the problem.

If you're going to set file permissions automatically, Joomla Developers, you might want to add an area to let the file permissions be set correctly by the users in the admin panel who know what file perms need to be on thier own installations.

WHO THE HELL USES 555 for file permissions?

One more thing, the brainiac that wrote this long winded, just about worthless article, http://docs.joomla.org/Migrating_from_1.0.x_to_1.5_Stable should get some help.

All those words to fill a page do NOT make a good manual.

The jump from 1 to 1.5 is fairly painless using the migrator tools. (on a small site)

Step 1) Backup the site.

Step 2) Make sure we have a good backup.

Step 3) Install component: Migrator.

Step 4) Read each link on migrator page and then start migrator and download SQL file created.

Step 5) Install 1.5 Joomla.

Step 6) Install migrator assistant Then run assistant and point it to the SQL file generated by the Migrator that we downloaded.

Step 7) Lets check the site now. It's up.

Step 8) Spend 2 hours reading all the posts with questions and vague or incorrect answers to the problem of editing a template and the ini not being writable, and then go view this thread with the issue and solution.

http://forum.joomla.org/viewtopic.php?p=1209369

Step 9) Now you're on your way, configure you site as you always did in the past...


Less than 10 steps. Done.


555 file permissions.... WTF were/are you thinking?

igrimpe, thank you again for your post. Even if I'm the only one who has thanked you.

paus
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Mon May 07, 2007 9:59 am
Contact:

Re: params.ini unwritable ...

Post by paus » Mon Mar 09, 2009 7:57 am

Thanks igrimpe for finding this, i changed all the 0555 to 0755 in the controller.php file and now it seems to be working just fine!

andria
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Tue Jul 22, 2008 9:07 pm

Re: params.ini unwritable ...

Post by andria » Fri Apr 17, 2009 10:45 am

igrimpe, thanks a lot!

Joomla, you gotta fix this!
params.ini is being used for setting up custom functions within a template. No sense in locking this file once the change has been done!

andria
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Tue Jul 22, 2008 9:07 pm

Re: params.ini unwritable ...

Post by andria » Fri Apr 17, 2009 10:48 am

would it be possible to use template override on this?
if so, that would be great!

andria
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Tue Jul 22, 2008 9:07 pm

Re: params.ini unwritable ...

Post by andria » Fri Apr 17, 2009 11:37 am

ADDENDUM:

although Joomla would say 'unwritable' you can make and save the changes! cool!

bcsgroup
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Jan 11, 2008 2:32 pm

Re: params.ini unwritable ...

Post by bcsgroup » Sat Jul 18, 2009 5:56 am

I am having a very simular issue and have spent over 8 hours researching and trying to resolve. Can you tell me specifically what you did in the controller.php file to get this to work?

Thanks
Dita

maryswave
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Sun Feb 22, 2009 5:38 pm

Re: params.ini unwritable ...

Post by maryswave » Sun Jul 26, 2009 11:28 pm

Hey Thanks... this solves my problems too

User avatar
JLW
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Tue Jan 02, 2007 5:30 am
Location: U.S.A.
Contact:

Re: SERIOUS JOOMLA BUG

Post by JLW » Thu Aug 13, 2009 11:46 pm

This is a serious bug! Not only does using the back-end to change template parameters (always) change the template's .ini file's permissions from 644 (correct) to 555 (wrong), but it (often) similarly messes up the template's css file as well (which screws up the site's front end).

And on rare occasions it trashes the permissions of every directory and file in the template's directory (sometimes changing everything to 000)!

This has happened to me now on three different sites, using three different professional templates from two different companies (Shape5 and RocketThemes).

When the folders get really screwed up, my hosting company's support team runs a script that scans and resets all the permissions, but it's a phone call every time. And it is always and only Joomla that causes it.

Directories should remain 755 and files 644. And since its is often faster to edit and upload a changed .ini file directly, the permission do matter, even if all that were getting changed was the .ini file. But that's not all that bcomes unwritable and sometimes unreadable.
---Jordan
http://www.UpgradeThat.com -- compare and save on computer upgrades
http://www.Accordionist.org -- the accordion community online

Shawn Alain
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Sun Feb 03, 2008 5:54 am
Contact:

Re: params.ini unwritable ...

Post by Shawn Alain » Sat Aug 15, 2009 4:55 am

Worked like a charm. With all the Joomla upgrades since you posted this in Feb 2008, how the heck has joomla not fixed this yet?
Viral In Nature - An Award Winning Social Media Agency | 1.844.403.BUZZ | www.viralinnature.com
Capturing the POWER of SOCIAL MEDIA for the benefit of our clients
Follow us at @ViralInNature www.facebook.com/ViralInNature

User avatar
JLW
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Tue Jan 02, 2007 5:30 am
Location: U.S.A.
Contact:

Re: params.ini unwritable ...

Post by JLW » Sun Aug 16, 2009 7:11 pm

For the convenience of folks who may be uncomfortable hacking files, I've posted the fixed /administrator/components/com_template/controller.php file into the downloads section at ElectronicMother.com
---Jordan
http://www.UpgradeThat.com -- compare and save on computer upgrades
http://www.Accordionist.org -- the accordion community online

chaten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Thu May 11, 2006 7:01 pm

Re: params.ini unwritable ...

Post by chaten » Wed Aug 26, 2009 10:24 am

Hello i'm having this problem for the very first time (created dozens of Joomla sites before). I've tried hacking it and even downloaded the file provided by JLW but still no luck. I've tried both legacy mode as well.

Any further ideas?

bimmerissues
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Oct 11, 2009 4:54 am

Re: params.ini unwritable ...

Post by bimmerissues » Sun Oct 11, 2009 5:14 am

So many threads about this issue, well I have it, tried everything in all the threads and still cant get it to change.
Even if I get "The parameter file /templates/ja_purity/params.ini is unwritable!" to change via the
hack
http://electronicmother.com/cms/index.p ... &Itemid=26
I can not get the text to change in the "Logo text" or "slogan" on my site ?
I did find this
http://joomlacode.org/gf/project/joomla ... m_id=12775
But I am unsure about what to do with it.

-------------------------
Edit did the hack and now
Parameters The parameter file /templates/ja_purity/params.ini is writable!
But when I use the logo it defaults back to the default, even if I ul a blank params.ini file
But if I use text for Template "text" it works right ?

Template Logo
Logo type image ( defaults to original ) Text ( works right )
Logo text XXXXX
Slogan XXXXX

----------------------------

I see that you have to change the logo, thought it changed the words for you, ugh that would have been nice

Shawn Alain
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Sun Feb 03, 2008 5:54 am
Contact:

Re: params.ini unwritable ...

Post by Shawn Alain » Wed Oct 27, 2010 5:39 am

I found that in addition to igrimpe's changes, after you do those you also have to go into the templates folder and set the params.ini permissions to 777. Thanks for the fix!
Viral In Nature - An Award Winning Social Media Agency | 1.844.403.BUZZ | www.viralinnature.com
Capturing the POWER of SOCIAL MEDIA for the benefit of our clients
Follow us at @ViralInNature www.facebook.com/ViralInNature

thorsti
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Oct 27, 2010 7:14 am

Re: params.ini unwritable ...

Post by thorsti » Wed Oct 27, 2010 7:57 am

Don't chmod to 777, that's a security hole, a big one. You will make your file world-writable and executable. That is, if somebody gets on your server somehow, even as a visitor, s/he can write and execute it. Better to check the group, that is see which groups the joomla application runs in and just change it to 775. Still risky (because the joomla and webserver are likely to be the same user and webservers tend to be rather open to the world, but still better).

Shawn Alain
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Sun Feb 03, 2008 5:54 am
Contact:

Re: params.ini unwritable ...

Post by Shawn Alain » Wed Oct 27, 2010 11:02 am

Thanks!
Viral In Nature - An Award Winning Social Media Agency | 1.844.403.BUZZ | www.viralinnature.com
Capturing the POWER of SOCIAL MEDIA for the benefit of our clients
Follow us at @ViralInNature www.facebook.com/ViralInNature

liutas4x4
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Nov 04, 2010 4:34 pm

Re: params.ini unwritable ...

Post by liutas4x4 » Sat Nov 06, 2010 5:12 pm

Shawn Alain wrote:Thanks!
Hey, on Joomla! side!

There are November 6, 2010.
You can not solve this problem till today?
In short: I install Joomla! 1.5.22 Full -- error warning exactly the same as 2 years ago:
"The parameter file /templates/ja_purity/params.ini is unwritable!" -- and still in red.

It is too complicated? You need to rewrite Joomla! from scratch?

Heh.

Eugenijus

jlpeifer
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Oct 01, 2007 5:59 pm

Re: params.ini unwritable ...

Post by jlpeifer » Sat Dec 04, 2010 4:55 am

igrimpe, Thanks for the advice! This was driving me crazy. Per your suggestion I went through administrator/components/com_templates/controller.php and changed all instances of 0555 to 0644. Everything has worked smoothly since then.

Shawn Alain
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Sun Feb 03, 2008 5:54 am
Contact:

Re: params.ini unwritable ...

Post by Shawn Alain » Thu Mar 17, 2011 6:04 pm

I'm sure they do but you're not exactly asking in the right place.
Viral In Nature - An Award Winning Social Media Agency | 1.844.403.BUZZ | www.viralinnature.com
Capturing the POWER of SOCIAL MEDIA for the benefit of our clients
Follow us at @ViralInNature www.facebook.com/ViralInNature

User avatar
hileon
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Mar 08, 2011 7:47 am
Location: Shanghai, China
Contact:

Re: params.ini unwritable ...

Post by hileon » Tue Mar 29, 2011 9:22 am

cool, change code in controll from "0555" to "0755" get everything works fine.

this famous bug is already copied and pasted into the new release joomla 1.6.
and the permission is changed from "0555" to "0444"
administrator/components/com_templates/models/source.php

Code: Select all

215                 // Try to make the template file unwriteable.
216                 if (!$ftp['enabled'] && JPath::isOwner($filePath) && !JPath::setPermissions($filePath, '0444')) {
217                         $this->setError(JText::_('COM_TEMPLATES_ERROR_SOURCE_FILE_NOT_UNWRITABLE'));
218                         return false;
219                 } else if (!$return) {
220                         $this->setError(JText::sprintf('COM_TEMPLATES_ERROR_FAILED_TO_SAVE_FILENAME', $fileName));
221                         return false;
222                 }


Locked

Return to “Administration 1.5”