replcon(1)

NAME
replcon - SELinux file context replacement tool

SYNOPSIS
replcon [OPTIONS] -c OLD NEW FILENAMES

DESCRIPTION
This manual page describes the replcon command.

replcon allows the user to find and replace file contexts. Replacements can be restricted by object class.

A context may be specified as a colon separated list of user, role, and type as follows - user_u:object_r:type_t. If your system supports MLS you can also add an additional MLS range to the end as follows - user_u:object_r:type_t:s0. The tool will automatically match a user, role, type, or range that is not specified, with any other user, role, type, or range. If your system has MLS and the translation library is enabled matching is done using it. If you want the tool to match raw contexts please use --raw option.

OPTIONS

--raw
    Specify context to search for, ignoring the translation library if present.

-c, --context=OLD NEW
    Specify context to search for, and replace.

-o, --object=OBJECT
    Only replace context for the specified object class.

-r, --recursive
    Recurse through directories.

-s, --stdin
    Read FILENAMES from standard input.

-q, --quiet
    Suppress progress output.

-V, --verbose
    Display context info.

-v, --version
    Display version information and exit.

-h, --help
    Display help information and exit.

INFORMATION
Valid object classes are

file, dir, lnk_file, chr_file, blk_file, sock_file, fifo_file, all_files

EXAMPLES

replcon -c : ::type_t .
    Replace every context in the current directory with type_t

replcon -c user_u: :role_r .
    Replace every context with user user_u in the current directory with role role_r

replcon -c ::type_t:s0 :::s0:c0 .
    Replace every context with type type_t and MLS range s0 in the current directory with range s0:c0

AUTHOR
This manual page was written by Kevin Carr <kcarr@tresys.com>.

COPYRIGHT
Copyright(C) 2006 Tresys Technology, LLC

SEE ALSO
findcon(1), searchcon(1), indexcon(1)