How to Apache Webserver openSUSE 11.3?

I am running 11.3 64bit.
I need to set up a simple web server, and I was trying to follow this tutorial to do it

HowTo: Configure a Linux Apache Web Server on Suse/openSUSE for SSI, Includes, CGI, Common Gateway Interface, AddHandler, ExecCGI, AllowOverride, htaccess, DocumentRoot

The web server is running but this part could not be applied and I need to change the ownership. it seems the command lampserver does not exist.


suzette@lampserver:~> su
Password:
lampserver:/home/suzette # chown -R suzette:users /srv/www
lampserver:/home/suzette # chown -R suzette:users /srv/ftp
lampserver:/home/suzette # 

I tried cnf lampserver and came back as lampserver:command not found

any body know of an updated tutorial or know how to resolve this?

The word lampserver in the code above is not a command, but part of the prompt and normaly is the hostname of the system you are working on. The commands to execute are after the # (chown).

BTW it should be

su -

and not

su

for reasons of security.

Hey Henk, I never have used the “su -” thing, always just use “su” to get the rootly powers. Please explain why one is more secure than the other (interested). Perhaps I will change the tutorial if it is important, not just semantics.

[BTW cepiolidus, whether you use “su” or “su -” to do the job is not going to matter in this instance (IMHO).]

This is not the first time I mention this. It is a sort of Ceterum censeo of me.

Read the man page of su and you will see that the - gives you a login shell. That means that you get rid of the environment of the user you was and get the environment of root. That environment includes e.g. another PATH then the original user (see the complaints about not finding root tools except by calling them with the full path).

The PATH variable alone is dangerous enough when it is not root’s one. As root you could call a program, executing a program of the same name in e.g. the ~HOME/bin/ directory of the original user (after all program/script names are free).

But other variables and not to forget aliases can be very dangerous.

This is also in: SDB:Login as root - openSUSE.

And this discussion is here in the forums several times. I even remember that I showed how root, after calling some tool, in fact executed xclock, which i rather harmless, but it showed enough the others in that duscussion. I can not find it, the search function of the forums and I do not go the same way :(.

Hey John, I found the old thread. It is amazing what works when you have no stress by wanting it to find NOW :wink:

It is here: Problem with permission, but i do not know if you will like it.
Because it shows in post #4 that a certain poster called Swerdna asks:

Hey Carl, why do we need the dash/minus symbol after the su?
rotfl!

In post #7 is my story told in a different way.
And in post #11 is the prove of concept.

EDIT: proof of concept.

On 03/05/2011 09:06 PM, hcvv wrote:
>
> And this discussion is here in the forums several times. I even
> remember that I showed how root, after calling some tool, in fact
> executed -xclock-, which i rather harmless, but it showed enough the
> others in that duscussion. I can not find it, the search function of the
> forums and I do not go the same way :(.

LOTS of writing in this thread, including Henks and others (some of
whom thought they knew what they were talking about, and some who
actually did know:

http://forums.opensuse.org/forums/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/424498-become-su-terminal-howto.html

and, in the end Carl changed his “su” to “su -” (as he should have)


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

Ah Ha…! I am re-educated yet again. How long will those bits stay in RAM I wonder, another 3 months? Back to the cave I go … mutter, mutter…

From the link you provided above, it would appear the user you’re trying to chown to doesn’t exist on your system if you cannot get it to work. Hence why the article in the link says ‘e.g. suzette’! The commands you could try entering instead are the following (as root user, of course):

chown -R wwwrun /web/directory/here
chgrp -R www /web/directory/here

[N.B. Please remember to replace [i]/web/directory/here with your actual web and/or FTP directory accordingly ;).]

This will give ownership to the ‘wwwrun’ user and the ‘www’ group, which will typically be what you need in order for the Apache web server to be able to access and/or manipulate your web pages accordingly. For example, if you were installing WordPress or something similar to your web server, you might need to give the Apache web user [wwwrun] and group [www] permission to access and modify the corresponding files in order to configure the default WordPress settings.

Hope this helps.

Regards,

Jon.

On 03/05/2011 11:06 PM, swerdna wrote:
>
> I am re-educated yet again. How long will those bits
> stay in RAM I wonder

maybe its not RAM, but ROM . . . (it seems like some of mine switched
the A to O!)


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11