Problem accessing web after copy directory with SYMLINKD with TC

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
xcn
Junior Member
Junior Member
Posts: 4
Joined: 2023-10-11, 08:27 UTC

Problem accessing web after copy directory with SYMLINKD with TC

Post by *xcn »

Registered user

config related parameters:
CopyLinks=2
IgnoreLinks=1
SyncIgnoreJunctions=1

I have a dir with links:
<SYMLINKD> dirtarget [c:\path\dirtarget]

when I copy with TC to disk d is converted to:
<JUNCTION> dirtarget [\??\d:\path\dirtarget]

That works perfectly in windows but Apache web server is not able to resolve it saying "access forbidden" probable thinking than the path is not inside the ones managed by the web because the \??\ added in front of destination path.

In order to work I have to delete the link made by TC and replace it with command:
mklink /d dirtarget d:\path\dirtarget

Then the apache web server resolve it with no more issues

Is there any solution?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Problem accessing web after copy directory with SYMLINKD with TC

Post by *ghisler(Author) »

Does it work when it's
<JUNCTION> dirtarget [\d:\path\dirtarget]
or does it have to by
<SYMLINKD> ?
Author of Total Commander
https://www.ghisler.com
xcn
Junior Member
Junior Member
Posts: 4
Joined: 2023-10-11, 08:27 UTC

Re: Problem accessing web after copy directory with SYMLINKD with TC

Post by *xcn »

It doesn't work with \ in front
<JUNCTION> dirtarget [\d:\path\dirtarget]

It works without this 1st \
<JUNCTION> dirtarget [d:\path\dirtarget]
made with the order:
mklink /j dirtarget d:\path\dirtarget

just as a remark, I tried to reproduce the order than TC does with:
mklink /j dirtarget \??\d:\path\dirtarget
but it didnt work, creating a:
<JUNCTION> dirtarget [d:\??\d:\path\dirtarget]
that is not like TC does: \??\d:\path\dirtarget
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Problem accessing web after copy directory with SYMLINKD with TC

Post by *ghisler(Author) »

Sorry, I didn't mean to put a backslash in front of the drive letter. It's strange that Apache doesn't like the prefix - in my tests, all junctions and reparae points had these. I'm reluctant to create them without the prefix. :(
Author of Total Commander
https://www.ghisler.com
xcn
Junior Member
Junior Member
Posts: 4
Joined: 2023-10-11, 08:27 UTC

Re: Problem accessing web after copy directory with SYMLINKD with TC

Post by *xcn »

I understand

Just let you know It happens.

I am already used to change them manually each time I do maintenace of the server and use the backup web

Thanks looking at it.
xcn
Junior Member
Junior Member
Posts: 4
Joined: 2023-10-11, 08:27 UTC

Re: Problem accessing web after copy directory with SYMLINKD with TC

Post by *xcn »

I think I found a touraround

instead of creating the symlink as:
mklink /d dirtarget c:\path\dirtarget
creating it as:
mklink /d dirtarget ..\dirtarget

then TC copy the link exactly like it was in origen as a SYMLINKD without the \??\
<SYMLINKD> dirtarget [..\dirtarget]
and Apache works with it

Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Problem accessing web after copy directory with SYMLINKD with TC

Post by *ghisler(Author) »

I prefer not to change this for now, because the links with prefix are the correct implementation, and the Explorer handled them just fine.

Moderator message

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Post Reply