NetworkClue.com
NetworkClue Home PageHome Contact UsContact ConsultingConsult
Bulletin Board
Internet Services covers Secrets to hosting websites, Hosting your own web server, and using DNS Servers.Operating Systems leads you through the decision of Linux vs. Windows, ideal installations and setups to create an efficient and redundant environment for your business, and great features to make management easier.Routing & Firewalls contains articles that will allow you to take control of your router. Learn how to protect your company with access lists and advanced firewall techniques.Hardware answers the common questions about Switches vs. Hubs, recommends SysAdmin Tools, and recommendations for adequate power protection.Utilities will cover fighting spam, using Anti-Virus programs effectively and the must haves for every administrator's software toolbox.


Bulletin Board

Using chcon

By Joshua Erdman
Digital Foundation, inc.

This command is new to Linux and my lack of knowledge about it totally kicked my butt when I upgraded from my old RH 9.0 server to a Fedora Core 3 server. See a new file security layer called a 'context' has been introduced. A file's context descriptor defines what the file is intended for. So providing security settings (chmod) and ownership rights (chown) is now not enough. I know, in pure desparation I went so far as to:

chmod 777 /home/username/HTML -R
chown apache:apache /home/username/HTML -R

Too no avail. Then I came across Linux File Context security and it pointed me in the right direction (that was about 5 Tylenol and 8 Advil later... errr and countless beers).

So all I had to do was define the right context for Apache and it worked!

chcon -t httpd_sys_content_t

So just use the command:

chcon --help

To get more info. If you need to know what contexts are set on a file, you can always:

ls -scontext

Article last reviewed: 02/13/2005

Created by: Digital Foundation, inc.

Copyright © 2002-2005 Digital Foundation, inc. www.networkclue.com

All content of the NetworkClue website is copyrighted. Articles, notes, outlines, and all other materials may not be stored on the Internet or sold or placed by themselves or with other material in any electronic or printed format in whole or part. However materials may be referenced by links to the site.

 

Related Articles:
Linux
Windows vs. Linux