phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

change the config file?


 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
Methen
Board Member



Joined: 29 May 2010

Posts: 32



PostPosted: Wed Aug 08, 2012 6:11 pm 
Post subject: change the config file?

when you install you suppose to change the config file to 777 or what? been a while
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 551
Location: North West UK


flag
PostPosted: Wed Aug 08, 2012 6:58 pm 
Post subject: Re: change the config file?

Yes chmod to 777 but do not leave it at that when you have completed the install. Chmod to 644 after the install.

Jim
Back to top
Methen
Board Member



Joined: 29 May 2010

Posts: 32



PostPosted: Wed Aug 08, 2012 10:19 pm 
Post subject: Re: change the config file?

Ok thank you...
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Thu Aug 09, 2012 1:27 am 
Post subject: Re: change the config file?

The answer provided is certainly correct, but I thought I would provide a bit more detail. In *nix systems the file permissions are set by a series of bit flags, and set in three groups. The permissions are rwx which stands for read, write, and execute. The permissions can be exclusive of each other, meaning you can have r+x without w and r+w without x and so on. Note that some options don't make sense, like only x or only w. The three groups are owner, group, and world. The owner is just what it says, whoever created the file owns it and gets the appropriate permissions. Group permissions are shared with the owner and whatever security group(s) the account is in, and world is everybody.

The settings are created as three binary bits. 000, 001, 010, and so on up to 111. Think of each bit as an on/off flag for the rwx setting. So a security setting for 111 has all three bits turned on, and is equivalent to r+w+x. 110 is r+w and 101 is r+x. So when someone tells you to set a file to 777 what they're asking is this:

7 = 111 = r+w+x for owner
7 = 111 = r+w+x for group
7 = 111 = r+w+x for world

This is the most open permission possible, and to be honest does not have to be used very often. Whenever someone tells you to "chmod 777" it's probably because they don't know (or don't care icon_wink.gif ) what is actually required. So as Jim suggested, when you change config.php to 777 the purpose is to allow the program to write to the file. I don't think it needs execute permissions, to be honest, but it doesn't hurt.

After the write is done, you want to revoke the ability to overwrite that file, and that's what chmod 644 does. Let's break that one down:

6 = 110 = r+w for owner
4 = 100 = r for group
4 = 100 = r for world

That means anyone can read the file (which we need, since this has the logon information) but only the owner of the file can write to it. Why not leave it this way from the beginning? Servers can be configured differently; in some cases php runs with the same permissions as apache, and in others it runs as a separate application which requires different permissions.

And none of this makes any sense when talking about Windows servers...

Probably more than you wanted to know, but I felt like writing a bit tonight. icon_cool.gif

_________________
phpBBDoctor Blog
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0255 seconds using 15 queries. (SQL 0.0018 Parse 0.0009 Other 0.0228)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo