Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
0 registered members (), 75 guests, and 223 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
whk
whk
Portsmouth, RI
Posts: 91
Joined: January 2009
Show All Member Profiles 
Top Posters(30 Days)
isaac 21
Ruben 10
Gizmo 8
Geoff 3
FREAK 2
Slaz 2
DennyP 1
Latest Photos
Testing to drag photos
Comfortable Cats
Test
BSA photos
Chinese Buddhist temple.
Previous Thread
Next Thread
Print Thread
Unable to open config.inc.php for writing. Please check permissions on the file. #258374
05/02/16 04:44 PM
05/02/16 04:44 PM
L
luket  Offline OP
enthusiast
Joined: Nov 2004
Posts: 214
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
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258375
05/02/16 04:47 PM
05/02/16 04:47 PM
isaac  Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,204
California
Give "SYSTEM" read/write/ownership of your UBB.threads directory.

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


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Released
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258376
05/02/16 04:58 PM
05/02/16 04:58 PM
L
luket  Offline OP
enthusiast
Joined: Nov 2004
Posts: 214
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/16 05:06 PM
05/02/16 05:06 PM
isaac  Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,204
California
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.


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Released
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: luket] #258378
05/02/16 05:20 PM
05/02/16 05:20 PM
isaac  Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,204
California
sending you a screenshot in PM


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Released
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258383
05/03/16 01:52 AM
05/03/16 01:52 AM
L
luket  Offline OP
enthusiast
Joined: Nov 2004
Posts: 214
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/16 01: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/16 01:58 AM
05/03/16 01:58 AM
isaac  Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,204
California
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!


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Released
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258400
05/03/16 06:51 PM
05/03/16 06:51 PM
L
luket  Offline OP
enthusiast
Joined: Nov 2004
Posts: 214
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/16 06:56 PM
05/03/16 06:56 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
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.
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/16 07:12 PM
05/03/16 07:12 PM
isaac  Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,204
California
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. "


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Released
Re: Unable to open config.inc.php for writing. Please check permissions on the file. [Re: isaac] #258406
05/03/16 08:30 PM
05/03/16 08:30 PM
L
luket  Offline OP
enthusiast
Joined: Nov 2004
Posts: 214
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/16 08: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/16 08:33 PM
05/03/16 08:33 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
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.
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!

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
UBB.threads 7.6.2 - Released
by isaac. 09/17/18 08:08 AM
7.6.2 Changelog Discussion
by isaac. 09/17/18 06:35 AM
Upgrade Documentation
by DennyP. 09/15/18 03:55 PM
PHP 7.2
by Geoff. 09/12/18 10:22 PM
Email Cleanup-Is it possible?
by Ruben. 09/06/18 11:25 AM
Forum Statistics
Forums36
Topics35,139
Posts191,439
Members12,106
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2