Editing
Capabilities and Flags
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== List of capabilities/flags == Below is a list of capabilities and flags used for contexts and processes within. The tables contain the following information: ; Bit : The bit number to enable the capability/flag ; Mask : The bit number in hexadecimal notation ; Name : Human readable identifier used in userspace utilities ; Tag : Special capability/flag code to denote special behaviour, legacy usage and others (see below) ; Description : Description of capability/flag effects === Special capability/flags codes === The tag column may contain one or more of the following tags: {| class="wikitable_inline" ! Tag ! Description |- | I | Internal use only |- | L | Only supported with legacy enabled |- | O | One time capability/flag (once it's cleared, it can't be re-enabled again) |- | U | Unsupported |- | X | Slightly different meaning in legacy |} === Context capabilities (ccaps) === The set of available context capabilities is specific to Linux-VServer and applied to all processes contained within a context. Below is a list of capabilities currently available in 2.1.1 and above. {| class="wikitable_list" ! Bit ! Mask ! Name ! Tag ! Description |- | style="text-align: right" | 0 | style="font-family: monospace" | 0x00000001 | SET_UTSNAME | | Allow setdomainname(2) and sethostname(2) |- | style="text-align: right" | 1 | style="font-family: monospace" | 0x00000002 | SET_RLIMIT | | Allow setrlimit(2) |- | style="text-align: right" | 2 | style="font-family: monospace" | 0x00000004 | FS_SECURITY | | Allow setxattr for security attributes |- | style="text-align: right" | 4 | style="font-family: monospace" | 0x00000010 | TIOCSTI | | Allow the tiocsti ioctl (fake input character) |- | style="text-align: right" | 8 | style="font-family: monospace" | 0x00000100 | RAW_ICMP | L | Allow usage of raw ICMP sockets |- | style="text-align: right" | 12 | style="font-family: monospace" | 0x00001000 | SYSLOG | | Allow syslog(2) |- | style="text-align: right" | 13 | style="font-family: monospace" | 0x00002000 | OOM_ADJUST | | Allow 'safe' oom adjustments |- | style="text-align: right" | 14 | style="font-family: monospace" | 0x00004000 | AUDIT_CONTROL | | Allow loginuid write (for auditing) |- | style="text-align: right" | 16 | style="font-family: monospace" | 0x00010000 | SECURE_MOUNT | | Allow secure mount(2) |- | style="text-align: right" | 17 | style="font-family: monospace" | 0x00020000 | SECURE_REMOUNT | | Allow secure remount |- | style="text-align: right" | 18 | style="font-family: monospace" | 0x00040000 | BINARY_MOUNT | | Allow binary/network mounts |- | style="text-align: right" | 20 | style="font-family: monospace" | 0x00100000 | QUOTA_CTL | | Allow quota ioctls |- | style="text-align: right" | 21 | style="font-family: monospace" | 0x00200000 | ADMIN_MAPPER | | Allow access to device mapper |- | style="text-align: right" | 22 | style="font-family: monospace" | 0x00400000 | ADMIN_CLOOP | | Allow access to loop devices |- | style="text-align: right" | 24 | style="font-family: monospace" | 0x01000000 | KTHREAD | | Allow creating kernel threads |- | style="text-align: right" | 25 | style="font-family: monospace" | 0x02000000 | NAMESPACE | | Allow namespace related operations |} === Context flags (cflags) === The set of available context flags is specific to Linux-VServer and applied to all processes contained within a context. Below is a list of flags available in 2.1.1 and above. {| class="wikitable_list" ! Bit ! Mask ! Name ! Tag ! Description |- | style="text-align: right" | 0 | style="font-family: monospace" | 0x00000001 | INFO_LOCK | L | Prohibit further context migration |- | style="text-align: right" | 1 | style="font-family: monospace" | 0x00000002 | INFO_SCHED | L | Account all processes as one |- | style="text-align: right" | 2 | style="font-family: monospace" | 0x00000004 | INFO_NPROC | L | Apply process limits to context |- | style="text-align: right" | 3 | style="font-family: monospace" | 0x00000008 | INFO_PRIVATE | L | Context cannot be entered |- | style="text-align: right" | 4 | style="font-family: monospace" | 0x00000010 | INFO_INIT | X | Show a fake init process |- | style="text-align: right" | 5 | style="font-family: monospace" | 0x00000020 | INFO_HIDE | X | Hide context information in task status |- | style="text-align: right" | 6 | style="font-family: monospace" | 0x00000040 | INFO_ULIMIT | L | Apply ulimits to context |- | style="text-align: right" | 7 | style="font-family: monospace" | 0x00000080 | INFO_NSPACE | L | Use private namespace |- | style="text-align: right" | 8 | style="font-family: monospace" | 0x00000100 | SCHED_HARD | | Enable hard scheduler |- | style="text-align: right" | 9 | style="font-family: monospace" | 0x00000200 | SCHED_PRIO | | Enable priority scheduler |- | style="text-align: right" | 10 | style="font-family: monospace" | 0x00000400 | SCHED_PAUSE | | Pause context (unschedule) |- | style="text-align: right" | 16 | style="font-family: monospace" | 0x00010000 | VIRT_MEM | | Virtualize memory information |- | style="text-align: right" | 17 | style="font-family: monospace" | 0x00020000 | VIRT_UPTIME | | Virtualize uptime information |- | style="text-align: right" | 18 | style="font-family: monospace" | 0x00040000 | VIRT_CPU | | Virtualize cpu usage information |- | style="text-align: right" | 19 | style="font-family: monospace" | 0x00080000 | VIRT_LOAD | | Virtualize load average information |- | style="text-align: right" | 20 | style="font-family: monospace" | 0x00100000 | VIRT_TIME | | Allow per guest time offsets |- | style="text-align: right" | 24 | style="font-family: monospace" | 0x01000000 | HIDE_MOUNT | | Hide entries in /proc/$pid/mounts |- | style="text-align: right" | 25 | style="font-family: monospace" | 0x02000000 | HIDE_NETIF | L | Hide foreign network interfaces |- | style="text-align: right" | 26 | style="font-family: monospace" | 0x04000000 | HIDE_VINFO | | Hide context information in task status |- | style="text-align: right" | 32 | style="font-family: monospace" | 0x0001<<32 | STATE_SETUP | IO | Enable setup state |- | style="text-align: right" | 33 | style="font-family: monospace" | 0x0002<<32 | STATE_INIT | IO | Enable init state |- | style="text-align: right" | 34 | style="font-family: monospace" | 0x0004<<32 | STATE_ADMIN | O | Enable admin state |- | style="text-align: right" | 36 | style="font-family: monospace" | 0x0010<<32 | SC_HELPER | I | Enable state change helper |- | style="text-align: right" | 37 | style="font-family: monospace" | 0x0020<<32 | REBOOT_KILL | | Kill all processes on reboot(2) |- | style="text-align: right" | 38 | style="font-family: monospace" | 0x0040<<32 | PERSISTENT | | Make context persistent |- | style="text-align: right" | 48 | style="font-family: monospace" | 0x0001<<48 | FORK_RSS | | Block fork when RSS limit is exceeded |- | style="text-align: right" | 49 | style="font-family: monospace" | 0x0002<<48 | PROLIFIC | | Allow context to create new contexts |- | style="text-align: right" | 52 | style="font-family: monospace" | 0x0010<<48 | IGNEG_NICE | | Ignore priority raise |} === Network capabilities (ncaps) === The set of available network capabilities is specific to Linux-VServer and applied to all processes contained within a network context. Below is a list of flags available since ''at least'' 2.3.0.34 {| class="wikitable_list" ! Bit ! Mask ! Name ! Tag ! Description |- | style="text-align: right" | 0 | style="font-family: monospace" | 0x00000001 | TUN_CREATE | | Allows the guest to open TUN devices (from the kernel's TUN/TAP-interface / network devices which link to userspace). ie: <code>tun_set_iff()</code> |- | style="text-align: right" | 8 | style="font-family: monospace" | 0x00000100 | RAW_ICMP | | Allow usage of raw ICMP sockets. (Makes <code>ping</code> work) |} === Network context flags (nflags) === The set of available network context flags is specific to Linux-VServer and applied to all processes contained within a network context. Below is a list of flags available in 2.1.1 and above. {| class="wikitable_list" ! Bit ! Mask ! Name ! Tag ! Description |- | style="text-align: right" | 0 | style="font-family: monospace" | 0x00000001 | INFO_LOCK | L | Prohibit further context migration |- | style="text-align: right" | 3 | style="font-family: monospace" | 0x00000008 | INFO_PRIVATE | | Context cannot be entered |- | style="text-align: right" | 8 | style="font-family: monospace" | 0x00000100 | SINGLE_IP | | Enable special handling of network contexts with a single IP only |- | style="text-align: right" | 9 | style="font-family: monospace" | 0x00000200 | LBACK_REMAP | | use loopback-virtualisation (will only work in 2.3.0.xx or greater) |- | style="text-align: right" | 10 | style="font-family: monospace" | 0x00000400 | LBACK_ALLOW | | if set, allows guests without LBACK_REMAP to connect to 127.0.0.0/8 |- | style="text-align: right" | 25 | style="font-family: monospace" | 0x02000000 | HIDE_NETIF | | Hide foreign network interfaces (ie: network interfaces not carrying and IP belonging to the guest) |- | style="text-align: right" | 26 | style="font-family: monospace" | 0x04000000 | HIDE_LBACK | | hides the real loopback-address from the guest (rewrites to 127.0.0.1 when queried) (will only work in 2.3.0.xx or greater) |- | style="text-align: right" | 32 | style="font-family: monospace" | 0x0001<<32 | STATE_SETUP | IO | Enable setup state |- | style="text-align: right" | 34 | style="font-family: monospace" | 0x0004<<32 | STATE_ADMIN | O | Enable admin state |- | style="text-align: right" | 36 | style="font-family: monospace" | 0x0010<<32 | SC_HELPER | I | Enable state change helper |- | style="text-align: right" | 38 | style="font-family: monospace" | 0x0040<<32 | PERSISTENT | | Make network context persistent. Allows you to configure a network context to use a certain IP with specific flags, and quickly run processes at later points with long pauses between them, rather than re-creating it every time a process needs to be executed. |} === System capabilities (bcaps) === The set of available system capabilities is inherited from the Linux kernel and applied to all processes contained within a context. Below is a list of capabilities currently available in the vanilla kernel. <div style="color: red; font-weight: bold;"> BIG FAT WARNING: Adding any system capability to your virtual server WILL reduce security. Do not change the default values unless you absolutely know what you are doing! </div> {| class="wikitable_list" ! Bit ! Mask ! Name ! Description |- | style="text-align: right" | 0 | style="font-family: monospace" | 0x00000001 | CHOWN | In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this overrides the restriction of changing file ownership and group ownership. |- | style="text-align: right" | 1 | style="font-family: monospace" | 0x00000002 | DAC_OVERRIDE | Override all DAC access, including ACL execute access if [_POSIX_ACL] is defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE. |- | style="text-align: right" | 2 | style="font-family: monospace" | 0x00000004 | DAC_READ_SEARCH | Overrides all DAC restrictions regarding read and search on files and directories, including ACL restrictions if [_POSIX_ACL] is defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE. |- | style="text-align: right" | 3 | style="font-family: monospace" | 0x00000008 | FOWNER | Overrides all restrictions about allowed operations on files, where file owner ID must be equal to the user ID, except where CAP_FSETID is applicable. It doesn't override MAC and DAC restrictions. |- | style="text-align: right" | 4 | style="font-family: monospace" | 0x00000010 | FSETID | Overrides the following restrictions that the effective user ID shall match the file owner ID when setting the S_ISUID and S_ISGID bits on that file; that the effective group ID (or one of the supplementary group IDs) shall match the file owner ID when setting the S_ISGID bit on that file; that the S_ISUID and S_ISGID bits are cleared on successful return from chown(2) (not implemented). |- | style="text-align: right" | 5 | style="font-family: monospace" | 0x00000020 | KILL | Overrides the restriction that the real or effective user ID of a process sending a signal must match the real or effective user ID of the process receiving the signal. |- | style="text-align: right" | 6 | style="font-family: monospace" | 0x00000040 | SETGID | * Allows setgid(2) manipulation * Allows setgroups(2) * Allows forged gids on socket credentials passing. |- | style="text-align: right" | 7 | style="font-family: monospace" | 0x00000080 | SETUID | * Allows set*uid(2) manipulation (including fsuid). * Allows forged pids on socket credentials passing. |- | style="text-align: right" | 8 | style="font-family: monospace" | 0x00000100 | SETPCAP | Transfer any capability in your permitted set to any pid, remove any capability in your permitted set from any pid |- | style="text-align: right" | 9 | style="font-family: monospace" | 0x00000200 | LINUX_IMMUTABLE | Allow modification of S_IMMUTABLE and S_APPEND file attributes |- | style="text-align: right" | 10 | style="font-family: monospace" | 0x00000400 | NET_BIND_SERVICE | * Allows binding to TCP/UDP sockets below 1024 * Allows binding to ATM VCIs below 32 |- | style="text-align: right" | 11 | style="font-family: monospace" | 0x00000800 | NET_BROADCAST | Allow broadcasting, listen to multicast |- | style="text-align: right" | 12 | style="font-family: monospace" | 0x00001000 | NET_ADMIN | * Allow interface configuration * Allow administration of IP firewall, masquerading and accounting * Allow setting debug option on sockets * Allow modification of routing tables * Allow setting arbitrary process / process group ownership on sockets * Allow binding to any address for transparent proxying * Allow setting TOS (type of service) * Allow setting promiscuous mode * Allow clearing driver statistics * Allow multicasting * Allow read/write of device-specific registers * Allow activation of ATM control sockets |- | style="text-align: right" | 13 | style="font-family: monospace" | 0x00002000 | NET_RAW | * Allow use of RAW sockets * Allow use of PACKET sockets |- | style="text-align: right" | 14 | style="font-family: monospace" | 0x00004000 | IPC_LOCK | * Allow locking of shared memory segments * Allow mlock and mlockall (which doesn't really have anything to do with IPC) |- | style="text-align: right" | 15 | style="font-family: monospace" | 0x00008000 | IPC_OWNER | Override IPC ownership checks |- | style="text-align: right" | 16 | style="font-family: monospace" | 0x00010000 | SYS_MODULE | * Insert and remove kernel modules - modify kernel without limit * Modify cap_bset |- | style="text-align: right" | 17 | style="font-family: monospace" | 0x00020000 | SYS_RAWIO | * Allow ioperm/iopl access * Allow sending USB messages to any device via /proc/bus/usb |- | style="text-align: right" | 18 | style="font-family: monospace" | 0x00040000 | SYS_CHROOT | Allow use of chroot() |- | style="text-align: right" | 19 | style="font-family: monospace" | 0x00080000 | SYS_PTRACE | Allow ptrace() of any process |- | style="text-align: right" | 20 | style="font-family: monospace" | 0x00100000 | SYS_PACCT | Allow configuration of process accounting |- | style="text-align: right" | 21 | style="font-family: monospace" | 0x00200000 | SYS_ADMIN | * Allow configuration of the secure attention key * Allow administration of the random device * Allow examination and configuration of disk quotas * Allow configuring the kernel's syslog (printk behaviour) * Allow setting the domainname * Allow setting the hostname * Allow calling bdflush() * Allow mount() and umount(), setting up new smb connection * Allow some autofs root ioctls * Allow nfsservctl * Allow VM86_REQUEST_IRQ * Allow to read/write pci config on alpha * Allow irix_prctl on mips (setstacksize) * Allow flushing all cache on m68k (sys_cacheflush) * Allow removing semaphores (Used instead of CAP_CHOWN to "chown" IPC message queues, semaphores and shared memory) * Allow locking/unlocking of shared memory segment * Allow turning swap on/off * Allow forged pids on socket credentials passing * Allow setting readahead and flushing buffers on block devices * Allow setting geometry in floppy driver * Allow turning DMA on/off in xd driver * Allow administration of md devices (mostly the above, but some extra ioctls) * Allow tuning the ide driver * Allow access to the nvram device * Allow administration of apm_bios, serial and bttv (TV) device * Allow manufacturer commands in isdn CAPI support driver * Allow reading non-standardized portions of pci configuration space * Allow DDI debug ioctl on sbpcd driver * Allow setting up serial ports * Allow sending raw qic-117 commands * Allow enabling/disabling tagged queuing on SCSI controllers and sending arbitrary SCSI commands * Allow setting encryption key on loopback filesystem * Allow setting zone reclaim policy |- | style="text-align: right" | 22 | style="font-family: monospace" | 0x00400000 | SYS_BOOT | Allow use of reboot() |- | style="text-align: right" | 23 | style="font-family: monospace" | 0x00800000 | SYS_NICE | * Allow raising priority and setting priority on other (different UID) processes * Allow use of FIFO and round-robin (realtime) scheduling on own processes and setting the scheduling algorithm used by another process. * Allow setting cpu affinity on other processes |- | style="text-align: right" | 24 | style="font-family: monospace" | 0x01000000 | SYS_RESOURCE | * Override resource limits. Set resource limits. * Override quota limits. * Override reserved space on ext2 filesystem * Modify data journaling mode on ext3 filesystem (uses journaling resources) * ''NOTE:'' ext2 honors fsuid when checking for resource overrides, so you can override using fsuid too * Override size restrictions on IPC message queues * Allow more than 64hz interrupts from the real-time clock * Override max number of consoles on console allocation * Override max number of keymaps |- | style="text-align: right" | 25 | style="font-family: monospace" | 0x02000000 | SYS_TIME | * Allow manipulation of system clock * Allow irix_stime on mips * Allow setting the real-time clock |- | style="text-align: right" | 26 | style="font-family: monospace" | 0x04000000 | SYS_TTY_CONFIG | * Allow configuration of tty devices * Allow vhangup() of tty |- | style="text-align: right" | 27 | style="font-family: monospace" | 0x08000000 | MKNOD | Allow the privileged aspects of mknod() |- | style="text-align: right" | 28 | style="font-family: monospace" | 0x10000000 | LEASE | Allow taking of leases on files |- | style="text-align: right" | 29 | style="font-family: monospace" | 0x20000000 | AUDIT_WRITE | ?? |- | style="text-align: right" | 30 | style="font-family: monospace" | 0x40000000 | AUDIT_CONTROL | ?? |}
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information