Editing
Secure chroot Barrier
(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!
== Solution: Secure Barrier == While early Linux-VServer versions tried to fix this by "funny" methods, recent versions use a special marking, known as the chroot barrier, on the parent directory of each VPS to prevent unauthorized modification and escape from confinement. This barrier is implemented as a [[Filesystem Attributes|Filesystem Attribute]] and prevents a path_walk into a directory with enabled barrier. Therefore it is important to set the barrier flag on your vserver base directory, for example: <pre> # setattr --barrier /vservers # showattr /vservers ---Bui- /vservers ---bui- /vservers/pasat </pre> If you keep all the guests in one mountpoint, setting the barrier on /vservers is enough, otherwise it should be repeated for each mount point. If you want to be safe you may choose to just set the barrier for each individual guest, for example: <pre> cd -P /etc/vservers/<guest>/vdir; setattr --barrier .. </pre> '' Please note that it's important to set the barrier against ".." inside /path/to/guest/ '' ''(note: <tt>---Bui-</tt> barrier set, <tt>---bui-</tt> barrier available and not set)'' [[Category:Documentation]]
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