?oddity virtualbox shared folder w. a soft link not mounted

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

?oddity virtualbox shared folder w. a soft link not mounted

Post by *ehab »

hi,

I noticed an oddity when i share a folder that contains a soft link to a folder not mounted on my lubuntu.

to repro:
---------------
host : lubuntu
guest : windows

on the linux pc create a folder that contains folders, files BUT mainly a soft link to a folder not mounted.

expected:
---------------
TC can browser the shared folder normally and does not enter the unmounted dir.

outcome:
---------------
TC does not show any contents. Empty shared folder.

* The oddity is TC can create a directory.

windows explorer normally does show the contents, i tried free commander and it refuses to enter the dir with " cannot find the specified folder " or similar error, i think this has got to do with winApi error.

same goes for 8.01, empty contents. Just my observation to help TC devs.






oddity VirtualBox shared folder with a soft link not mounted
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC uses normal FindFirstFileW / FindNextFileW on all remote folders too. It seems that the Samba server doesn't return any files for these links, maybe for security reasons to avoid directory traversal attacks.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

ghisler(Author) wrote:It seems that the Samba server doesn't return any files for these links, maybe for security reasons to avoid directory traversal attacks.
There is a Samba setting called "wide links" (disabled by default since quite some Samba versions) that causes the server to ignore links if the their target is outside the share. But I have some doubts that this the cause as it may affect any program accessing the share... but ehab says Windows Explorer shows files and TC doesn't.

Anyway, I really don't recommend to enable wide links in Samba (even if it is the cause) because this opens potential security holes.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

just wanted to add a small important tip.

I am not using Samba. The folder is provided by virtual box additions. It can be accessed this way.

Code: Select all

\\vboxsvr\sharename
and can be mapped to a drive this way

Code: Select all

net use x: \\vboxsvr\sharename
in virtual box there is an option to automount. I don't have time to check the return/output values from Findnext api but i'll do that. TC needs to be perfect 8)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2ehab
Sorry, I don't understand what your remark has to do with this topic. If the server doesn't return the directory content, TC cannot show it, it's that simple.
Author of Total Commander
https://www.ghisler.com
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

2ghisler

windows explorer sees the directory and i can browse through out. TC does not show the directory contents.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, if FindFirstFile doesn't return anything, there is no chance to make it work with TC.
Author of Total Commander
https://www.ghisler.com
Post Reply