Remove SELinux Permissions

Remove SELinux permissions for directories created before you disabled SELinux.

This is important if you did not just freshly install Linux. In particular, the Oracle storage home, STA database, STA database local backup, and STA logs locations must not have SELinux permissions.

  1. Open a terminal session and log in as the system root user.
  2. List permissions for the Oracle storage home, STA database, STA database local backup, and STA logs locations. In a brand-new Linux installation these directories likely do no exist yet, but you should verify.

    For example:

    # ls –ld /Oracle /dbdata /dbbackup /var/log/tbi 
    
    drwxr-xr-x. 2 oracle oinstall  4096 Jul 30 14:48 /Oracle
    drwxr-xr-x. 3 root   root  4096 Jul 30 14:46 /dbdata
    drwxr-xr-x. 3 root   root  4096 Jul 29 14:13 /dbbackup
    drwxrwxrwx. 4 root  root 4096 Jul 30 14:46 /var/log/tbi
    #
    
  3. In the output for each command, look for a dot at the end of the permissions. In the following example, note the "." after drxwr-xr-x.
    # ls -ld /Oracle
    
    drxwr-xr-x.  5  oracle oinstall  4096  Jul  30  18:27  /Oracle
    
  4. If none of the directories contain a dot after the permissions statement, SELinux permissions have not been assigned to the directories and you can proceed to the next task.

    If SELinux permissions are assigned to a directory, enter the following command for that directory.

    # setfattr -h -x security.selinux directory_name
    

    For example:

    # setfattr -h -x security.selinux /Oracle /dbdata /dbbackup /var/log/tbi
    
  5. Confirm that the SELinux permissions have been removed.
    # ls –ld /Oracle /dbdata /dbbackup /var/log/tbi 
    
    drwxr-xr-x 2 oracle oinstall  4096 Jul 30 14:48 /Oracle
    drwxr-xr-x 3 root   root  4096 Jul 30 14:46 /dbdata
    drwxr-xr-x 3 root   root  4096 Jul 29 14:13 /dbbackup
    drwxrwxrwx 4 root  root 4096 Jul 30 14:46 /var/log/tbi
    #