![]() Which are not harmfull, then unused empty dirs will be removed. Nota: you could rmdir /media/share/pictures/*, then will see some: rmdir: failed to remove '/media/share/pictures/drive1/': Device or resource busy Of course, this have to be done with root privileges! By using sudo or maybe from udev scripts.Ĭare to umount the bind ( umount "$target") before umounting the real source ( /media/driveX) and don't forget to remove the mountpoint ( rmdir "$target"). Target="/media/share/pictures/$(basename "$item")" loop by something like: for item in /media/"drive1/pictures"/* mount -o uid=XXX,gid=YYY /dev/sdX1 /media/drive1 To read ln -s "./$"Īs correctly answered by slm, you could not dereference symlinks by nfs server, but as correctly pointed out by alejandro izquierdo, you could use bind mount to make the job:Įnsure to mount your VFAT or NTFS with option uid=XXX to match correct user ( lsc). In the script change your ln line from ln -s "$item" "$target" Why can't you make all the symlinks relative? That would do the trick.Īssuming that on the NFS server (1.2.3.4), you have the following mounted (different physical drives possible) /media/drive1/pictures/ NOTE: The bind bind solution in /etc/fstab won't work here, since every subfolder of /media/share/ points to different locations/disks. My question: How can I share a folder that follows symlinks on the host that's sharing the mount? When I mount my share mount 1.2.3.4:/ foo the symlinks try to follow on the local host. Since this is a pure private network and the share is READONLY, security isn't a big deal. I've been sharing this successfully with Samba for a whlle now. Target=/media/share/pictures/`basename "$item"` I merge every subfolder with a script like this: # I do this for every drive I have a folder called share which has symlinks for every subfolder of each pictures directory of each drive. Perhaps this could be because, in WSL, looking in the (now mounted) /mnt/c I see a bunch of 'special' NTFS files that are gibberish or 'Permission Denied' and Windows (ironically) is interpreting those isolated errors as an error within the entire folder, and bailing, rather than just ignoring data in a "foreign language", so perhaps it is just "lost in translation".I have different disks with pictures /media/drive1/pictures/ My guess this is due to permissions applied to the 'fake' SMB share behind this mechanism, as the linux file permissions are the same.Īt the moment I don't see this as a real issue but I can't say it's 100% OK for everybody. ![]() (I get permission denied) even though I can access \wsl$\mnt\home. ![]() The only issue I have, is that it seems the same mount method does not provide access to C:\. If you want Windows files physically on WSL (so symlinks between file systems) then it may be possible using a symlink from a SMB mount in windows, with corresponding bind mount in Linux but I've not tried that. I would avoid 'special' windows folders, e.g. It is possible to share common locations between Windows and WSL if the files and symlinks are physically located on e.g. Though, as far as I can tell, the symlink source and target must be on the same filesystem, which makes sense as Windows does not yet natively mount EXT4. C:\ /mnt/c) rather than using a fake network like \\wsl$ / (or \\wsl.localhost\ /) Then you can use symbolic links, from either OS, both sides. Yet, anywayīasicly you can make WSL faster and symlinks better using a direct bind mount (i.e. It seems you can mount and use symlinks but not over SMB. PD: Relates to this (unsolved) question in SO: - The question was closed last month and suggested to be moved to SuperUser. What am I doing wrong? What should I do to see b as a browsable folder in the windows side? In the Windows Explorer b appears as a file, not a folder: I added these lines to /etc/samba/smb. Windows can follow the symlinks fine, but OSX finder won't. In CMD (UNC \\wsl$\Ubuntu-20.04 mounted in W:): Hi guys, For some reason, Mac OSX won't follow symlinks on a samba share I've created on Ubuntu 14.04. When I go to the windows side, the symlink is broken. ![]() If I create a file named a/hello.txt and symlink b pointing to a, I can cat b/hello.txt and see it: mkdir test It seems best to put unix extensions no into the global section and follow symlinks yes and wide links yes only into the shares section, where you really need it. I would appreciate any help in seeing the linux symlinks in the windows side Practical example of what I do In linux bash, it works See also this question titled Ubuntu + latest samba version, symlinks no longer work on share mounted in Windows. But I cannot manage to see it from windows. Whenever I create a symlink in the linux side, I expect it to be seen from the windows side (as it happens for example in a server with samba). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |