If SELinux affect normal operation of Linux server?

Posted on 2009-04-28
Last Modified: 2013-12-16
When I need edit config file in my server or delete, copy file ... I disable SElinux to do these work, then I enable it.
This way is right?

SElinux should always enable to protect server? and Is it not good for what case?

Thanks in advanced!
Question by:laptop1vn
    1 Comment
    LVL 29

    Accepted Solution

    why you need to disalbe selinux when you do copy or delete ??
    selinux does not create any problem if you try to copy and past.

    selinux is to protec server for unautorized access

    as an example
    suppose you httd running and you have put some file under /var/www/html/webdirectory

    so if you check the permission of that directory you will see something like this

    system_u:object_r:httpd_sys_content_t html  

    so here html is protect by selinux ...

    now if you want to modify the default virtual host directory from /var/www/html to /var/html

    then you need to change the permission of this /html for selinux, other wise, selinux will not allow apache to read that directory

    with this command

    chcon -R -t httpd_sys_content_t /Directory_name

    so now you have enabled security enhanced in new location for html ....


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now