After reviewing for days, I can figure out to fix the symlink of /home/[user] to /home/jail/[user]/home/[user] in cse jailkit failed to be enabled for a user.
Everytime we enable jailkit for a user, it will add a new line in
/etc/fstab/
the new line is like this
/home/[user_cwp] /home/jail/[user_cwp]/home/[user_cwp] none bind,nobootwait 0 0
And it also automatically create file
/run/systemd/generator/home-jail-[user_cwp]-home-[user_cwp].mount
/run/systemd/generator/local-fs.target.requires/home-jail-[user_cwp]-home-[user_cwp].mount that symlink to /run/systemd/generator/home-jail-[user_cwp]-home-[user_cwp].mount
It causes we cant remove /home/jail/user when we do not use jailkit anymore. And everytime we reboot the server, the /home/jail/user will be created automatically.
So, to fix this issue, just follow this step
rm -rf /run/systemd/generator/home-jail-[user_cwp]-home-[user_cwp].mount
rm /run/systemd/generator/local-fs.target.requires/home-jail-[user_cwp]-home-[user_cwp].mount to remove the symlink
vi /etc/fstab
add comment (#) before /home/[user_cwp] /home/jail/[user_cwp]/home/[user_cwp] none bind,nobootwait 0 0 or delete that line
reboot server
Now /hom/jail/[user] will not exist anymore.
Remember, it just in case jailkit error when enabling for a user. You do not need to do this if jailkit is enabled successfully. It it enabled successfully, it will remove the line at /etc/fstab/ and /home/jail/[used] when you disable jailkit for that user.
Hope it helps.