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
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?
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.