LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Urgent (https://www.linuxquestions.org/questions/linux-newbie-8/urgent-4175438176/)

techgirl43 11-21-2012 03:04 PM

Urgent
 
Good evening, I just wonder if someone can help me with symbolic link. I know it is very easy for people who use Linux. I need to finish my coursework.
I need to create an alternative Apache HTTP Servr directory called osswww under the /var directory and create a symbolic link to this directory in the standard Apache HTTP Server root directory and demonstrate that web pages cannot be served by default from this directory when Selinux is enabled and in enforcing mode. Undertake the nesessary modifications to selinux security to allow web pages to be sered from the /var/osswww directory and demonstrate that pages can now be served.
Please, can someone help me? Alexa

markush 11-21-2012 03:16 PM

Hello techgirl43, welcome to LQ,

please use a more descriptive title for your thread, your issue isn't urgent for anyone of us.

As of symbolic links you should take a look at the manpage for ln
Code:

man ln
If it doesn't work, please tell us what you've done so far, then we can help you.

Markus

techgirl43 11-21-2012 03:31 PM

sorry
 
Sorry, I know it is not urgent for all of you, but for me it it, thats why that title.
I created directory osswww
mkdir /var/osswww
then touch /var/www/html/index.html
then vi (created simple webpage)
then my soft link
ln -s /var/osswww /var/www
I dont know if im doing this right.
Then I enabled SELinux, enforcing mode.
But my file can be served, I dont know what am doing wrong, because it was supposed
to failed.
I used wget http://localhost.index.html

TB0ne 11-21-2012 03:44 PM

Quote:

Originally Posted by techgirl43 (Post 4834302)
Good evening, I just wonder if someone can help me with symbolic link. I know it is very easy for people who use Linux. I need to finish my coursework.

...and this is NOT URGENT for ANYONE here. Expecting/asking for 'urgent' help from a community of volunteers is fairly rude. Especially since this is YOUR HOMEWORK
Quote:

I need to create an alternative Apache HTTP Servr directory called osswww under the /var directory and create a symbolic link to this directory in the standard Apache HTTP Server root directory and demonstrate that web pages cannot be served by default from this directory when Selinux is enabled and in enforcing mode. Undertake the nesessary modifications to selinux security to allow web pages to be sered from the /var/osswww directory and demonstrate that pages can now be served.
As markush said, read the man page on the 'ln' command...and since you probably used Google to find this site, why can't you also have used it to look up how to create a symbolic link?

You don't say what version/distro of Linux you're using, but also reading the documentation on selinux would help:
http://en.wikipedia.org/wiki/Security-Enhanced_Linux

Pay attention to the "permissive" directive, and also the FollowSymlinks directive in the apache configs.

techgirl43 11-21-2012 03:51 PM

thanks
 
Thank you, I know that if I want to serve webpages I need to swich to permissive mode.
I just wonder, how come I can serve my webpage in enforcing mode. Also, I am not sure where I should
create index.html. Under the /var/osswww, or /var/www/html? I wrote the steps I took, I would like to know
if they are correct or not. Thank you very much, I will read the links you sent me. I am using CentOS.

techgirl43 11-21-2012 03:56 PM

and SORRY again
 
I am really really SORRY. I said it before. I didnt mean to be rude, not at all.
I never used forums before, I didnt know that I cant use URGENT. I apologize.

markush 11-21-2012 04:06 PM

Hi,

as far as I remember you should create the index.html in the new directory. I'm no expert for apache, but the sense of the alternative directory is afaik that you can host an additional website on the server. And shouldn't there already be a file /var/www/html/index.html? before you used touch to create one?

Markus

markush 11-21-2012 04:09 PM

Here a link, hope this helps: http://www.debian-administration.org/articles/412

Markus

techgirl43 11-21-2012 04:15 PM

Thanks
 
Thanks alot, see, I am sure I need to create index.html, I will try to create it under the new directory. Thanks alot for the link:-)
Thanks gyus for your answers, see, I am not a Linux user, I am studying at Cisco academy CCNP.

markush 11-21-2012 04:19 PM

Quote:

Originally Posted by techgirl43 (Post 4834334)
Thanks alot, see, I am sure I need to create index.html, I will try to create it under the new directory. Thanks alot for the link:-)
Thanks gyus for your answers, see, I am not a Linux user, I am studying at Cisco academy CCNP.

But networking is (relatively) independent of the operatingsystem and the advantage of Linux (compared with Windows) is, that you can get a deeper understanding of many things. Linux will teach you a lot if your really use it.

Markus

techgirl43 11-21-2012 04:25 PM

Yeah, you are right. It is just little bit hard for me, but I know I can do it :-)

markush 11-21-2012 04:30 PM

Yes, it is hart to do both at once, learning Cisco and Linux. But both very valuable.

Good luck

Markus

techgirl43 11-21-2012 04:42 PM

Yes. Now I know how much Windows spoil us :-D


All times are GMT -5. The time now is 03:35 PM.