Per user virtual mount points

Navigation:  CageFS > Configuration > Mount Points >

Per user virtual mount points

Previous pageReturn to chapter overviewNext page

[CageFS 5.1 and higher]

 

* Please, see Split by username feature, as it might be more simpler to implement in some cases.

 

Starting with CageFS 5.1 you can specify additional directories to be mounted inside user's CageFS. This can be specified for each user.

To specify virtual mount points for a user, create a file:

/var/cagefs/[prefix]/[user]/virt.mp

 

Inside that file, you can specify mount points in the following format:

 

virtdir1,mask
@subdir1,mask
@subdir2,mask
virdir2,mask
@subdir3,mask
@subdir4,mask
^virtdir3,mask
@subdir5,mask
@subdir6,mask
# comments

 

mask is always optional, if missing 0755 is used

Create virtual directory subdir/virtdir, mount it to:

oskeleton jaildir/virtdir

oinside virtual directory, create directories subdir1, subdir2

omount virtdir1/subdir1 to subdir/virtdir/subdir1

oif virtdir is started with >, create directory subdir/virtdir, but don't mount it into jaildir. This is needed for cases
when virtdir is inside home base dir.

if file /var/cagefs/[prefix]/[user]/virt.mp is missing -- no virt directories are loaded for that user.

 

Note that CageFS will automatically create those files for Plesk 10 & higher.

 

For example if we have plesk11.5 with two users cltest1, and cltest2:

 

cltest1 uid 10000 has domains: cltest1.com, cltest1-addon.com and sub1.cltest1.com
cltest2 uid 10001 has domains: cltest2.com, cltest2-addon.com

 

In such case we would have file /var/cagefs/00/cltest1/virt.mp:

 

>/var/www/vhosts/system,0755
@cltest1-addon.com,0755
@cltest1.com,0755
@sub1.cltest1.com,0755

 

and file: /var/cagefs/01/cltest2/virt.mp:

 

>/var/www/vhosts/system
@cltest2-addon.com
@cltest2.com