?oddity virtualbox shared folder w. a soft link not mounted
Moderators: Hacker, petermad, Stefan2, white
?oddity virtualbox shared folder w. a soft link not mounted
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
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
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
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.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.
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
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.
and can be mapped to a drive this way
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 
I am not using Samba. The folder is provided by virtual box additions. It can be accessed this way.
Code: Select all
\\vboxsvr\sharename
Code: Select all
net use x: \\vboxsvr\sharename

- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
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
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com