Previous Thread
Next Thread
Print Thread
Hop To
Unable to open config.inc.php for writing. Please check permissions on the file. #258374 05/02/2016 3:44 PM
Joined: Nov 2004
Posts: 173
luket Offline OP
enthusiast
OP Offline
enthusiast
Joined: Nov 2004
Posts: 173
Hi guys.
I just migrated my message board ( 7.5.9 ) to a new webserver.

All looks good (content displays) but when I go to open the board, I get the message:
Unable to open config.inc.php for writing. Please check permissions on the file.

I moved from Plesk 9.5 on a Windows Server 2005
-to-
Plesk 12 on a Windows Server 2012

BIG jump, pretty amazed all is working so well.
So I need to know what "user" needs what access to the config.inc.php ?

As a test I added "Everyone - Full Access" to that file only to open the board, then removed that liberal access.
After opening the board, posting works, and all is well.

So I'm pretty sure the migration worked, database is ok, etc...
I think what isn't ok is any writable PHP files.


Member since November 2004
Gold Member since Feb 2008
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258375 05/02/2016 3:47 PM
Joined: Apr 2004
Posts: 1,537
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,537
Give "SYSTEM" read/write/ownership of your UBB.threads directory.

This will allow the "current machine" to make the file changes, as needed.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258376 05/02/2016 3:58 PM
Joined: Nov 2004
Posts: 173
luket Offline OP
enthusiast
OP Offline
enthusiast
Joined: Nov 2004
Posts: 173
id242,

SYSTEM already has full access to that file, so that's not the problem.
Also, it's not that I (as an administrator of the machine) can't edit the file, but rather UBB.Threads Control Panel can't edit the file.

UBB.Threads Control Panel must assume some user identity when it's updating PHP files (and it's certainly not SYSTEM access.)
It's that identity I am seeking.



Member since November 2004
Gold Member since Feb 2008
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258377 05/02/2016 4:06 PM
Joined: Apr 2004
Posts: 1,537
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,537
Your permissions were "lost" (different user) when moving the directories from your old server to your new Windows server.

Take a look at the other WWW files/directories outside of your forums directory. When doing a fresh install of UBB.threads, those are the same permissions given, since it technically was "the server doing the install." These are the same ownership permissions you want to give to the "new" files you've just added.

The permission needs to be given to the directory. The config.ini.php file is not actually not "changed."
But instead, UBB.threads creates a new one with each settings change. Then it overwrites the old file with the new file.
So the folder's read/write permission needs to be set.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258378 05/02/2016 4:20 PM
Joined: Apr 2004
Posts: 1,537
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,537
sending you a screenshot in PM


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258383 05/03/2016 12:52 AM
Joined: Nov 2004
Posts: 173
luket Offline OP
enthusiast
OP Offline
enthusiast
Joined: Nov 2004
Posts: 173
Okay, solved.

On Plesk 9.x, Plesk created "users" for each web/domain which are the user accounts that access web resources like php and HTML files.
Under Plesk 9.x these users were called: PLESK IIS User (hostname\IUSR_someusername)
This "user" under 9.x had the "full control" to do things like modify config.inc.php.

Plesk 12 (at least) changed this model an went with a 'least privilege' model. Additionally, they renamed this user so as to make it a bit tougher to locate.
Under plesk 12 this user is: IWPG_someusername. By default this user only has 'read' permission. By granting this user 'full control' on this file UBB Threads Control Panel can now modify config.inc.php to do things like "close the message boards".

Now, with this said, I understand I may have to grant this access to other files and possibly even directories (if all the files in that directory require read/write permissions.)

PS. id242, I checked and both my old working server and the new one has the SYSTEM access you had described on the "includes" folder. The difference was the special user account that Plesk creates to read/write/execute web/domain files described above.

Last edited by luket; 05/03/2016 12:57 AM.

Member since November 2004
Gold Member since Feb 2008
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258384 05/03/2016 12:58 AM
Joined: Apr 2004
Posts: 1,537
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,537
My bad. I totally missed the whole "Plesk" part and only saw "Windows."

I'm glad that you got it all worked out. I do hope that you didn't have to spend a lot of time on it.

Good stuff and nice follow-up post!


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258400 05/03/2016 5:51 PM
Joined: Nov 2004
Posts: 173
luket Offline OP
enthusiast
OP Offline
enthusiast
Joined: Nov 2004
Posts: 173
Sure np.

By the way, the changes I describe above need to be applied to the /includes directory since everything in there is written to, like forum inserts and such. No need to do the individual files, just give IWPG_someusername read/write permission the the directory.



Member since November 2004
Gold Member since Feb 2008
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258401 05/03/2016 5:56 PM
Joined: Jun 2006
Posts: 15,846
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,846
You should apply that to the entire UBB.threads directory; or, if you insist on doing it per directory, it'd need to be applied to:
/cache
/cache_builders/custom
/gallery
/images (if you want to allow uploads from the control panel)
/includes
/languages (if you want to be able to use the editor)
/sessions
/styles (if you want to be able to create/manage styles)
/templates/compile
/tmp
/uploads (if you're using this directory for uploads)


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258402 05/03/2016 6:12 PM
Joined: Apr 2004
Posts: 1,537
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,537
Luket, since you moved your forum from one server setup to another setup, did you run the "Permission Check" within the CP?

Control Panel > Tools & Information

http://www.EXAMPLE.com/forums/admin/fileperms.php

"This page will test to make sure all files and directories have the proper permissions. Note that not all of these permissions are required for your forum to be operational. Some of these permissions are only used in the control panel, for example the languages. You only need to change these permissions if you want to update your language files in the control panel. "


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258406 05/03/2016 7:30 PM
Joined: Nov 2004
Posts: 173
luket Offline OP
enthusiast
OP Offline
enthusiast
Joined: Nov 2004
Posts: 173
I did, Permission check doesn't catch this situation:
Code
cache (OK)
cache_builders/custom (OK)
gallery/137/full (OK)
gallery/137/medium (OK)
gallery/137/thumbs (OK)
gallery/default/full (OK)
gallery/default/medium (OK)
gallery/default/thumbs (OK)
gallery/index.html/full (OK)
gallery/index.html/medium (OK)
gallery/index.html/thumbs (OK)
images/avatars/default (OK)
images/forumimages/default (OK)
images/graemlins/default (OK)
images/graemlins/default_dark (OK)
images/icons/default (OK)
images/icons/default_dark (OK)
images/markup_panel/default (OK)
images/markup_panel/default_dark (OK)
images/news/default (OK)
images/news/default_dark (OK)
images/moods/default (OK)
images/moods/default_dark (OK)
includes (OK)
languages/english (OK)
languages/english/admin (OK)
sessions (OK)
styles (OK)
templates/default (OK)
tmp (OK)


Not sure, but maybe Permission Check is simply looking at the file system permissions, and not what access the 'user account' has.
I think for permission check to catch this error, it would need to actually open the file for writing() to make the determination.

Thanks Gizmo for the list. I will make these updates pronto.

Last edited by luket; 05/03/2016 7:32 PM.

Member since November 2004
Gold Member since Feb 2008
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258407 05/03/2016 7:33 PM
Joined: Jun 2006
Posts: 15,846
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,846
That's strange that it'd list everything as ok when they can't be written to (since the permissions aren't open for them), but then again, Windows servers can have some "special" quirks.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Followed List v7.7.2 Question
by Ruben - 11/12/2019 12:22 PM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Exceeded Number of attachments
by rbrtgrmn - 11/02/2019 9:57 PM
Forum New User Registration
by kf6zpl - 10/25/2019 10:45 AM
Having issue with redirects to UBB classic URLs
by amciotola - 10/16/2019 12:11 AM
Who's Online Now
2 registered members (JAISP, isaac), 66 guests, and 458 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)