Author Topic: Remaster with lighttpd - lighttpd log files change owner after install  (Read 2794 times)

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Hi,

I am trying to make a remaster that contains all necessary to  bring in a working Wordpress blog.

So I have done several tests since a few weeks, none work the way I would like, though it comes out useable.

I explain:
I want it to work as a live CD, as well as an installed distribution once the live CD installed on hard drive. It is configured with Lighttpd, php, mysql. It also has phpMyAdmin installed and working, and additionnally, a Wordpress blog with several themes and plugins ready to go.

What happens:
first, once the live iso ready, when booting it, some browsers would not display the working theme in Wordpress. (The browsers are configured to start after login, with a "@browser" in the ~/.config/lxsession/LXDE/autostart file).

Now I figured out that Flock browser is nice on this matter and displays the theme fine. But similarly to other browsers it doesn't display the them in the Wordpress admin section !

Else, I sayd phpMyAdmin is installed and works : well, only Arora can connect to phpMyAdmin, and the other browsers : Firefox, Flock, (I didn't try Opera or Chrome) just crash when clicking on the entry in localhost. It's possible to turn around by loging in from the administration section of Wordpress, because I installed the plugin phpmyadmin that allows login into it from within the admin of WP.

Once installed, what happens ? This: The browsers start, and the localhost/wordpress page says "internal server error", so...

I do this:
*************************************************************
[root@localhost melodie]# service lighttpd start
Starting lighttpd: 2010-02-13 20:03:23: (log.c.118) opening errorlog '/var/log/lighttpd/error.log' failed: Permission denied
                                                                [  OK  ]
[root@localhost melodie]# ls -l /var/log/lighttpd/
total 140
-rw-r--r-- 1 root root 138366 Feb 13 19:27 access.log
-rw-r--r-- 1 root root   2836 Feb 13 19:27 error.log   
[root@localhost melodie]# chown -R lighttpd.lighttpd /var/log/lighttpd/
[root@localhost melodie]# service lighttpd start
Starting lighttpd:                                              [  OK  ]
[root@localhost melodie]# service mysqld start
Starting MySQL: .                                               [FAILED]

[root@localhost melodie]# service mysqld stop
                                                                [FAILED]
[root@localhost melodie]# service mysqld start
Starting MySQL:                                                 [FAILED]
[root@localhost melodie]# service mysqld restart
                                                                [FAILED]
Starting MySQL: .                                               [FAILED]
[root@localhost melodie]# mysqld_safe
100213 20:10:33 mysqld_safe Logging to '/var/lib/mysql/localhost.err'.
100213 20:10:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql


*************************************************************
Well, after lighttpd started, I could see the main wordpress page, but not go to "connection" (error on database connection), so I had to start mysql too. As you can see, on first start I need to start the mysqld_safe program in order for it to work.

Until now, after a few tests I did preceedingly, it seems that once mysql has been started once, even with "mysqld_safe" command, it will work next times too.

Now the critical questions : any fix for the lighttpd and mysqld start after it has been installed ? What happens during install that makes lighttpd and mysqld not work at once after install ?

About the images not showing in live CD, or in live iso, does anyone have an idea what is going on ?

Screenshots of the distro in function:





Thanks.
« Last Edit: February 13, 2010, 02:24:27 PM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Remaster with lighttpd - lighttpd log files change owner after install
« Reply #1 on: February 13, 2010, 03:45:05 PM »
I don't know the answer to your question right off, but I would first try to figure out what the problem is (how to fix it on the liveCD), then look into why it is happening.

Have you compared your /etc/passwd, shadow, & group files both pre & post remaster?  I would first make sure that the associated users & groups exist and are unchanged by the remaster process.

Next I would look into files owned by lighttpd both pre & post remaster (as root, adjust log name):
Code: [Select]
find / -user lighttpd 1> pre-remaster.log
..and then use diff to see what has changed:
Code: [Select]
diff /path/to/pre-remaster.log /path/to/post-remaster.log

If that does not show anything, you could look deeper for differences in group, permissions, etc using find / diff.  ..hope that helps.  :-\








Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12518
Re: Remaster with lighttpd - lighttpd log files change owner after install
« Reply #2 on: February 13, 2010, 04:02:50 PM »
You would have to dig into the mklivecd code as it wasn't designed to run server software and the /var folder has many exclusions when generating the livecd.

Thanks to everyone who donates. You keep the servers running.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Remaster with lighttpd - lighttpd log files change owner after install
« Reply #3 on: February 13, 2010, 04:11:36 PM »
You would have to dig into the mklivecd code as it wasn't designed to run server software and the /var folder has many exclusions when generating the livecd.

..I have never had problems remastering servers using apache, php, & mysql (and even wordpress running with them). I'm not sure why lighthttpd would be different

 ..it has been awhile since I've remastered; I will give it a try in just a moment (I have this setup on my laptop right now for testing various updates before applying them to a "production" small business server)
« Last Edit: February 13, 2010, 04:22:29 PM by travisn000 »

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Remaster with lighttpd - lighttpd log files change owner after install
« Reply #4 on: February 13, 2010, 04:37:27 PM »
Hi,

At the beginning, lighttpd files belong to lighttpd.lighttpd. After remastering, the live version is ok on this precise question. It's after install that it has changed.

Should I change the default "lighttpd.lighttpd" belonging in the lighttpd.conf file to avoid this problem ? Usually, all the files should belong to "other than root" (lighttpd, or better, nobody) in order to avoid security issues.

In 2 days, I may be able to give a link to a version in english of this remaster, if you are willing to have a closer look. I am just starting a new remastering now, and will upload it tomorrow night.

Thanks for your interest.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Remaster with lighttpd - lighttpd log files change owner after install
« Reply #5 on: February 14, 2010, 03:15:26 AM »
Hi,

Finally I could do it faster than I thought, I uploaded 2 remasters here, one being in english.

Thanks.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode