Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

I've got a file on my apache/linux server. ls -Z gives:

drwxr-xr-x. apache   apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 localization.smicloud.org

I need to change unconfined_u to system_u like all my other dirs.

I have been googling and on several places I found info that this is how to do it:

semanage fcontext -a -t httpd_sys_content_t localization.smicloud.org

and

semanage fcontext -a -t httpd_sys_rw_content_t localization.smicloud.org

Those give following error:

libsemanage.get_home_dirs: netbeans homedir /var/www/html or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than 500 or its login shell is /sbin/nologin.

I'm not really sure why netbeans is mentioned. It is my development tool but it's not present in the information about the directory. The directory is empty!

How can I fix this?

Update

I wasn't to clear about my real problem: I am trying to use Netbeans to ftp my files to this folder. It works for all other folders and the only difference I can see between this and those is this part.

share|improve this question

marked as duplicate by Michael Hampton, dunxd, mdpc, Scott Pack, Tom O'Connor Mar 16 '13 at 17:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Correct, that answer did solve my question. But it wasn't the root cause of my real issue... –  Nicsoft Mar 12 '13 at 20:04

1 Answer 1

up vote 1 down vote accepted

You don't need to change this if you're using the default targeted SELinux policy; it's ignored.

share|improve this answer
    
Ok. I wasn't really to clear what my problem really was. I am trying to use Netbeans to ftp my files to this folder. It works for all other folders and the only difference I can see between this and those is this part. Is this still irrelevant? Updating my question. –  Nicsoft Mar 12 '13 at 20:01
    
You should probably completely rewrite your question from scratch. –  Michael Hampton Mar 12 '13 at 20:03
    
You actually answered the question I asked and that is that it's not needed. –  Nicsoft Mar 12 '13 at 20:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.