1

Topic: install help writable config file ?

Hi,

Trying to install and I get:

PHP 5.1.2     PHP 5.3.3-1ubuntu9.3
PDO supported     true
PDO supports MySQL 1)     true
PDO supports SQLite 3 1)     false
PDO supports PostgreSQL 1)     false
Config file exists 2)     true
Config file is writable 2)     false
Public directory is writable 3)     false
Clean URLs support available 4)     not detected

I tried chmod php.config to 755 but that did not help. So for right now I changed it back to 644. I'm learning on Ubuntu localhost setup. Below I'm posting what I think are the relevant permissions. Please let me know what to change or if more info needed. Thanks!

Also have another probably general config very optional question - I see that root is the user and group who owns the files. I expected to see www-data in the mix. At the bottom I show output of a ps command I think shows relevant info. I know this may be a little off-topic but is my config OK? Again thanks.

giga1@giga1:/var/www/wolfcms$ ls -la
total 48
drwxr-xr-x 5 root root  4096 2011-04-08 15:02 .
drwxr-xr-x 3 root root  4096 2011-04-08 15:02 ..
-rw-r--r-- 1 root root     0 2011-01-07 00:29 config.php
drwxr-xr-x 2 root root  4096 2011-04-08 15:02 docs
-rw-r--r-- 1 root root   928 2011-01-07 00:29 _.htaccess
-rw-r--r-- 1 root root  6112 2011-01-07 00:29 index.php
drwxr-xr-x 4 root root  4096 2011-04-08 15:02 public
-rw-r--r-- 1 root root  1770 2011-01-07 00:29 readme.md
-rw-r--r-- 1 root root 11400 2011-01-07 00:29 security.php
drwxr-xr-x 7 root root  4096 2011-04-08 15:02 wolf
giga1@giga1:/var/www$ ps auwfx | grep apache
root      1427  0.0  0.2  36344  7508 ?        Ss   11:49   0:00 /usr/sbin/apache2 -k start
www-data  1434  0.0  0.1  36424  4880 ?        S    11:49   0:00  \_ /usr/sbin/apache2 -k start
www-data  1435  0.0  0.3  39512 10192 ?        S    11:49   0:00  \_ /usr/sbin/apache2 -k start
www-data  1436  0.0  0.3  39896 10928 ?        S    11:49   0:00  \_ /usr/sbin/apache2 -k start
www-data  1437  0.0  0.1  36424  4832 ?        S    11:49   0:00  \_ /usr/sbin/apache2 -k start
www-data  1438  0.0  0.2  38484  8456 ?        S    11:49   0:00  \_ /usr/sbin/apache2 -k start
www-data  2410  0.0  0.1  36424  4796 ?        S    12:01   0:00  \_ /usr/sbin/apache2 -k start
www-data  3171  0.0  0.3  38740  9588 ?        S    12:10   0:00  \_ /usr/sbin/apache2 -k start
www-data  3172  0.0  0.3  38344  9400 ?        S    12:10   0:00  \_ /usr/sbin/apache2 -k start
www-data  3401  0.0  0.3  39652 10364 ?        S    12:36   0:00  \_ /usr/sbin/apache2 -k start
www-data  4809  0.0  0.3  39920 10916 ?        S    14:30   0:00  \_ /usr/sbin/apache2 -k start
giga1     5796  0.0  0.0   4008   764 pts/0    S+   15:46   0:00      \_ grep --color=auto apache
giga1@giga1:/var/www$

Thumbs up

2

Re: install help writable config file ?

Hi there,

I'll run through your questions point by point for ease... smile

1) "Config file is writeable" checks to see if the HTTP server user can write to the file since that's the user that will be generating the config.php content. Since the files are owned by root in your case and only the owner of the files have write permissions....

The easiest method to make sure config.php is writable is to do the following:

chmod a+w config.php
---- install wolf ----
chmod a-w config.php

This will respectively add and later remove all write permissions.

2) As for root owning your files. Wolf CMS does not control that. It probably happened because you used the "sudo" command to extract the zip file after downloading it. It actually doesn't matter too much who owns the files. Root owning them is slightly more secure than www-data owning them since www-data only needs read permissions.

If you keep your files owned by root, you will need to change ownership for the public directory since that is used by the File Manager to upload files to. Just use:

chown -R www-data: public

You will still have to use the "sudo" command if you want to edit any files though since the user you're logged in with is (I expect) neither "root" nor "www-data".

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

3

Re: install help writable config file ?

Hi,

I installed and it worked. I clicked the security check link and it said I had some fatal errors to fix. I fixed my config.php permissions, but there were a few other things to fix too. I wanted to go back to a admin page to find the security check link again and recheck after I fixed each problem.

I am embarrassed to say I can not find the admin page. I see the default home page, but no links on that or any other Wolfcms page I can find that will take me to an admin page and hopefully a button or link to the securty check again.

How do I get to the admin page and how to run security check again?

Thanks.

Last edited by leegold (2011-04-09 20:10)

Thumbs up

4

Re: install help writable config file ?

leegold wrote:

How do I get to the admin page and how to run security check again?

Admin: depends on where you put Wolf, and whether you're using "clean URLs".

- If Wolf is in website root with clean URLs: http://localhost/admin
- If Wolf is in website root without clean URLs: http://localhost/?admin
- If Wolf is in subdirectory with clean URLs: http://localhost/wolf/admin
- If Wolf is in subdirectory without clean URLs: http://localhost/wolf/?admin

(".../wolf/... = whatever you called the subdir!) And if you used a "suffix" (e.g. "...page.html"), you will need to add that, too.

Security: the security.php file is in the same directory as config.php and index.php, so when you're looking at Wolf's Homepage, you should just be able to add ".../security.php" to the address.

Hope that helps!

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

5

Re: install help writable config file ?

I can get to the login page now but I can not login. I have access to the user table and tried some "stuff" with that table but still can not login. I looked at previous posts in the forum but again, can't login. I could try a fresh install. I will wipe out and redo  the DB and the delete the wolfcms folder in /var/www and redo it or

If you cite steop by step what I need to do to log-in I will try it...else I will ty reinstall; I can edit the DB tables...

I need to know the default login user ("admin" ? I think) and the default password in any event. What is it? What is fix?

Thanks again.

Thumbs up

6

Re: install help writable config file ?

leegold wrote:

I need to know the default login user ("admin" ? I think) and the default password in any event. What is it? What is fix?

There is no default password. The password is generated randomly at install time.

Since you probably don't have mail services on your local install and thus cannot use the "forgot password" function, the easiest will be to reset the password:

1. Go to the user table in the DB and edit the "admin" user record.
2. Empty the "salt" field
3. Replace the "password" field content with: d0be2dc421be4fcd0172e5afceea3970e2f3d940
4. Make sure the "failure_count" field is set to 0.

Following these steps will force Wolf CMS to fall back to SHA1 mode.

The new value for the password field I gave you corresponds to "apple". You can use this to log into the admin account, then reset the password in the backend.

That should be enough. Have fun! smile

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

7

Re: install help writable config file ?

I'm wanting to chmod the config.php after installation to -rwxr-xr-x any ideas for best practice? I'm also thinking that the best place would be on a successful install in wolf/install/post-install.php - any thoughts on potential issues anyone?

8

Re: install help writable config file ?

blake wrote:

I'm wanting to chmod the config.php after installation to -rwxr-xr-x any ideas for best practice? I'm also thinking that the best place would be on a successful install in wolf/install/post-install.php - any thoughts on potential issues anyone?

You mean you want Wolf CMS to automatically change the permissions after install?

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

9

Re: install help writable config file ?

essentially, yes. I'm building an auto install WolfCMS on a VPS so am just trying to sort out some of the issues. Any help with the config.php much appreciated

10

Re: install help writable config file ?

Thanks now I can reset my password to "apple". :-)

Thumbs up

11

Re: install help writable config file ?

Just wanted to post a thanks to the dev team for this post.  Helped me out when my genius self forgot to reset the password after the install... It was a long night!

Thumbs up