You are not logged in.

#1 2014-03-25 19:47:20

LeftyAce
Member
Registered: 2012-08-18
Posts: 159

[solved] Uninstalled apache, and now can't get it back

Hi all,

I installed apache based on the wiki instructions here: https://wiki.archlinux.org/index.php/LAMP#Installation

I then decided I didn't need it, so I did a

pacman -Rsn apache

and manually deleted the http user and group.

Now I want apache back, so I install it like this:

 pacman -Syu apache php php-apache

When I try to start httpd, I run into problems. The command doesn't finish and just sits there:

[root@Lefty-laptop Lefty]# systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
[root@Lefty-laptop Lefty]# systemctl start httpd.service

systemctl status says

# systemctl status httpd.service
httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: inactive (dead)

Any ideas what I'm doing wrong?
For some reason, if I look at /etc/passwd, no http user appears. /home/http doesn't exist either.

Thanks in advance!

Last edited by LeftyAce (2014-03-25 21:15:42)

Offline

#2 2014-03-25 20:05:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] Uninstalled apache, and now can't get it back

Works here:

$ sudo systemctl start httpd.service
[test]$ grep http  /etc/passwd
http:x:33:33:http:/srv/http:/bin/false

Have you tried a reboot?

Any errors in the logs or systemd's journal?

Offline

#3 2014-03-25 20:14:49

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [solved] Uninstalled apache, and now can't get it back

I checked apache package sources and I do not see that user 'http' created by Apache package. The history says apache never used 'useradd' command https://projects.archlinux.org/svntogit … ges/apache

I have http user on my machine and I do not remember that I added it manually so it means some other package created user 'http', and it is weird.

@LeftyAce - just re-create 'http' user.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#4 2014-03-25 20:19:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] Uninstalled apache, and now can't get it back

$ ls -l /etc/passwd
-rw-r--r-- 1 root root 1015 Mar 23 12:07 /etc/passwd

Does https://projects.archlinux.org/svntogit … filesystem mean it's there by default?

Offline

#5 2014-03-25 20:19:58

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [solved] Uninstalled apache, and now can't get it back

Ok, the user 'http' is shared by several packages (e.g. php, nginx) and created by one of the core packages: filesystems  https://projects.archlinux.org/svntogit … filesystem

@LeftyAce - do not remove 'http' user it is a system one. It worth adding this information to the wiki page.

Last edited by anatolik (2014-03-25 20:20:51)


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#6 2014-03-25 21:04:42

LeftyAce
Member
Registered: 2012-08-18
Posts: 159

Re: [solved] Uninstalled apache, and now can't get it back

Thanks for all the replies.

I reinstalled the filesystem package, and now the http user shows up in /etc/passwd. Unfortunately, I still cannot start httpd.service, it sits there not doing anything. journalctl -xn doesn't show anything after the su session I used to become root and try this.

Anywhere else I could look for hints?

Offline

#7 2014-03-25 21:15:21

LeftyAce
Member
Registered: 2012-08-18
Posts: 159

Re: [solved] Uninstalled apache, and now can't get it back

Ok, it looks like I needed to install php and php-apache, and now everything works.

To conclude: First I had to reinstall the filesystem package to fix the fact that I had manually deleted the http user. Then I had to reinstall apache, php, and php-apache. Thanks for the help everyone!

Offline

Board footer

Powered by FluxBB