apachecmdxamppcertbotmklink

.symlink lost its target once reboot the pc


I have one website virtual hosting under xampp apache and using certbot to obtain ssl cert

certbot certonly --webroot --w C:\\xampp\\htdocs\\mysite\\wordpress --d www.mysite.com

After successful obtain It created 4 pem files in C:\Certbox\archive\mysite\ and 4 .smylink(.pem) files in C:\Certbox\live\mysite\ which symlink to those 4 files on archive folder

Heres the problem: Everytime I reboot the pc, those 4 .smylink(.pem) files seems lost its target to those 4 pem files in C:\Certbox\archive\mysite\ and seems to became broken and preventing xampp apache from starting

What I've tried:

  1. Cmd run cd C:\Certbot\live\mysite\ then del cert.pem.symlink and recreate mklink /H cert.pem.symlink C:\Certbot\archive\mysite\cert.pem

Solution

  • It turn out is the permission issues,those symlink has reset the permissions after system reboot which is very odd , this explain why the "shortcut" tab in properties was missing which I missunderstand the symlink was losing the target.

    I have to regrant permissions to those symlink files by doing icacls <path> /grant Everyone:(R) via cmd