Search the web
Sign In
New User? Sign Up
lucknow-lug · Uttar Pradesh Linux Users Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
need help in preparation of RHCE exam   Message List  
Reply | Forward Message #199 of 247 |
Re: need help in preparation of RHCE exam

--- In lucknow-lug@yahoogroups.com, "monsterisback" <vidurmittal@...>
wrote:
>
> From exam point of perspective you should enable SELinux otherwise all
> of our questions will be treated as incorrect. Yes you should apply
> the correct boolean.
> f.e. you enable share a directory using samba then you have to apply
> the correct boolean so that samba can access it. you can copy the
> SELinux permissions from the smb.conf to the directory using the
> following command
> chcon -R --reference=/etc/samba/smb.conf /path/of/the/share
>
>
>
> --- In lucknow-lug@yahoogroups.com, Prem Chand <pcy1988@> wrote:
> >
> > plz suggest me some tips about RHCE exam. what we should keep
remember.
> > ************************************************************
> > in perspective of RHCE exam.
> > suppose we have enabled the SELinux and we solve a question. but the
> question�require to apply the correct boolean for proper working
> > but it is not mentioned in the ques. to apply the the boolean. then
> what should we do ? should we apply the boolean or not.���
��� ��� ���
> ��� ��� ��� ��� ��� ���
��� ��� ���
> >
>
Yes Vidur has given a correct hint, suppose you have configured your
apache in a way that a user of your server can share his web pages in
~user/public_html directory then without setting correct boolean of
~user/public_html directory a client will see a forbidden message.
So we have to set the correct boolean value same as of our default
apache DocumentRoot "/var/www/html"
this can be achieved with the command
'chcon -R -v --reference=relevant_file /path/to/our/file-dir'

chcon -R -v --reference=/var/www/html/index.html ~anuj/public_html/
context of /home/anuj/public_html/ retained as
system_u:object_r:httpd_sys_content_t
context of /home/anuj/public_html//index.html retained as
system_u:object_r:httpd_sys_content_t




Different types of boolean values:

[root@anuj ~]# ls -lZ /etc/samba/smb.conf
-rw-r--r-- root root system_u:object_r:samba_etc_t /etc/samba/smb.conf
[root@anuj ~]# ls -lZ /etc/httpd/conf/httpd.conf
-rw-r--r-- root root system_u:object_r:httpd_config_t
/etc/httpd/conf/httpd.conf
[root@anuj ~]# ls -lZ /var/ftp/
drwxr-xr-x root root system_u:object_r:public_content_t pub



Example configuration of apache on RHEL5 to enable user webpages
(/etc/httpd/conf/httpd.conf)
Find the following lines:
----------------------------------------
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
UserDir public_html

</IfModule>
--------------------------------------------------------------------
Also do a chmod 755 ~user

I hope this can provide you some basic of SELinux handling.
In case of some doubt with above example you can ask again. Try and
tell us if you face any problem.

Anuj Singh




Sat Jul 5, 2008 9:32 pm

anujsingh_1
Online Now Online Now

Forward
Message #199 of 247 |
Expand Messages Author Sort by Date

plz suggest me some tips about RHCE exam. what we should keep remember. ************************************************************ in perspective of RHCE...
Prem Chand
pcy1988
Offline Send Email
Jul 5, 2008
5:34 am

From exam point of perspective you should enable SELinux otherwise all of our questions will be treated as incorrect. Yes you should apply the correct boolean....
monsterisback
Offline Send Email
Jul 5, 2008
5:43 am

... remember. ... ��� ��� ��� ... ��� ��� ��� ... Yes Vidur has given a correct hint, suppose you have configured your ...
anujsingh_1
Online Now
Jul 5, 2008
9:33 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help