linux - How to map a symbolic directory link to different directories based on user id -
is there way map symbolic link directory different directories based on user id in linux. instance if user x executes cd /var/www/html/
his/her directory gets changed /var/www/webx/
, while user y /var/www/weby
. purpose of doing make web document directories transparent different apache users.
thanks
one line answer: no. linux filesystem not support conditional symlink evaluation of type envisioning.
alternatives:
=> (programmatically) create symlinks in each user's home directory point required location in /var/www/
. example, in user x's home directory:
ln -s /var/www/htmlx htmldir
in user y's home directory:
ln -s /var/www/htmly htmldir
so each user can go cd htmldir
, appropriate location.
=> use the per-user directory feature assign ~user/public_html
or more generically, ~user/<some-name-consistent-across-users>
html dir user
.
Comments
Post a Comment