EnglishFrenchSpanish

OnWorks favicon

replcon - Online in the Cloud

Run replcon in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command replcon that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


replcon - SELinux file context replacement tool

SYNOPSIS


replcon NEW_CONTEXT DIR [OPTIONS] [EXPRESSION]

DESCRIPTION


replcon allows the user to find and replace file contexts. Replacements can be filtered
by object class as described below.

REQUIRED ARGUMENTS


NEW_CONTEXT
The replacement context as expressed as a partial context, described below.

DIR Initial directory to begin searching. The tool will recurse into any
subdirectories, so be sure there are no circular mounts within it.

EXPRESSION


The following options allow the user to specify which files to find. A file must meet all
specified criteria for its context to be replaced. If no expression is provided, all
files' contexts are replaced.

-t TYPE, --type=TYPE
Search for files with a context containing the type TYPE.

-u USER, --user=USER
Search for files with a context containing the user USER.

-r ROLE, --role=ROLE
Search for files with a context containing the role ROLE.

-m RANGE, --mls-range=RANGE
Search for files with a context with the MLS range of RANGE. Note that replcon
ignores the SELinux translation library, if present. In addition, this flag is
ignored if DIR has no MLS information.

--context=CONTEXT
Search for files matching this partial context. This flag overrides -t, -u, -r,
and -m.

-p PATH, --path=PATH
Search for files which include PATH.

-c CLASS, --class=CLASS
Search only files of object class CLASS.

OPTIONS


-R, --regex
Enable regular expressions

-v, --verbose
Display context info during replacement.

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

-V, --version
Print version information and exit.

PARTIAL CONTEXT


The --context flag and NEW_CONTEXT argument specify a partial context, which is a a colon
separated list of user, role, and type. If the system supports MLS, the context may have
a fourth field that gives the range. With --context if a field is not specified or is the
literal asterisk, then the query will always match the field. With NEW_CONTEXT if a field
is not specified or is the literal asterisk, then that portion of the context will not be
modified.

OBJECT CLASSES


Valid object class strings are

block, char, dir, fifo, file, link, or sock.

NOTE


The replcon utility always operates on "raw" SELinux file contexts. If the system has an
installed translation library (i.e., libsetrans), those translations are ignored in favor
of reading the original contexts from the filesystem.

EXAMPLES


replcon ::type_t: .
Replace every context's type in the current directory with type_t. The user and
role portion remain unchanged.

replcon -u user_u *:role_r:* .
Replace every context's role with user user_u in the current directory with role_r.
The user and type portion remain unchanged.

replcon --context ::type_t:s0 :::s0:c0 /tmp
Replace every context with type type_t and MLS range s0 in /tmp with MLS range
s0:c0.

Use replcon online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • 2
    usm
    usm
    Usm is a unified slackware package
    manager that handles automatic
    dependency resolution. It unifies
    various package repositories including
    slackware, slacky, p...
    Download usm
  • 3
    Chart.js
    Chart.js
    Chart.js is a Javascript library that
    allows designers and developers to draw
    all kinds of charts using the HTML5
    canvas element. Chart js offers a great
    array ...
    Download Chart.js
  • 4
    iReport-Designer for JasperReports
    iReport-Designer for JasperReports
    NOTE: iReport/Jaspersoft Studio Support
    Announcement: As of version 5.5.0,
    Jaspersoft Studio will be the official
    design client for JasperReports. iReport
    will...
    Download iReport-Designer for JasperReports
  • 5
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 6
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • More »

Linux commands

Ad