Symbolic links on Samba share - symlink

I have a Samba share. Is there any way to determine from Windows side if a specific folder is a symlink or standard directory?

According to the MS documentation this was not taken into account in the protocol specification. On that page you can see that there is no specification for the (symbolic) links.
I also tested with smbclient under Linux (Ubuntu) and there is no difference between links and directory.

Related

Accessing source codes to modify Linux driver

I'm a beginner at Linux kernel. I have to modify the Linux driver for a project.
how do I access the source code files (such as ani.c, ath9k.h, etc.)?
I tried looking for them in the following path, but I only found kernel object files (*.ko).
PATH: drivers/net/wireless/ath/ath9k/
It's probably easiest to find them on Linus's GitHub account. You might find the guides linked from "Working with the kernel development community" helpful too.

Windows file share under Cygwin?

I have an issue with mounting Windows file share in Cygwin.
We have Windows file share which is using NFS to share content. I was assigned to install Cygwin on it so some application can connect over SFTP to that server.
Now they need to access the shared folder from that application and the app would pull data from that folder.The thing is that the folder is Windows shared folder (exmple; \server\photos). the current Windows users need to be able to connect to that share (it is mapped to their M drive) and the app need to connect to SFTP and pull the data from there.
My idea was to mount that NFS share in Cygwin and set it as /home directory so when the app connects, it automatically goes there.
My questions are: is this possible, and does anyone know any better solutions?
I am open for all suggestions.
Thank you.
Cygwin views the top of its directory tree / to be within the Windows directory C:\cygwin64 (or whatever its installation directory was). As a result, you are unable to move above that point in the filesystem from a Cygwin shell. The solution is to go through Cygwin's directory /cygdrive, which is automatically set up as the access point where all Windows disk drives are mounted. If your shared folder is mounted in Windows as M:, you should be able to access it in Cygwin as /cygdrive/m without any additional work.
As far as setting it up as /home, you might be able to create a symbolic link from /home to /cygdrive/m if that is what you need.

Windows 7 - no network - What do I need to locally fake UNC path for development/testing?

Situation: I'm on a stand-alone development computer running Windows 7. Not connected to any Windows Server. Would like to test a Window application's ability to use UNC paths. Will be transferred later to a Linux server (not at my location), hence the desire to use a cross-platform path mechanism (UNC) (//servername/sharename), rather than a Window's mapped drive (X:\foldername).
The application is Autodesk Maya 2014. A project's main file contains many references to other files. These file references can be relative paths ("subfolder/filename.ext"), absolute paths ("H:/projects/this_project/subfolder/filename.ext"), or UNC paths ("//servername/projects/.." or "servername/assets/..").
The app permits forward slashes, and maps those to the correct character on different OSes. Wherever possible, I use relative paths.
But I have a situation where a plug-in is not correctly working with relative paths, so I have resorted to using some absolute paths. It has been requested that I change these from the current mapped drive form, to UNC paths. REASON: the data will be transferred to a render farm, running Linux. A Linux version of the app will be used. (So my question isn't about accessing Linux files from my Windows box; it is about setting up all the data so that when everything is moved to the render farm, it will still run.)
Due to the combination of plug-ins and features we are using in Maya, I am not 100% certain I can convert all paths to relative form. (Questions there for Maya forums.) So as a fallback, I need to test with UNC paths. Am asking what it would take to set this up on my Windows 7 PC, without actually connecting to a server computer. (Don't have Linux nor Windows Server set-up at my location.)
I don't normally do network-related programming, nor server programming, so the various possible solutions are not familiar to me.
Googling suggests some basic techniques, that may or may not be relevant. Before I spend more time on this, want to know if I am going in the correct/easiest direction.
installing a local DNS server and editing its hosts file. Such as:
http://sourceforge.net/projects/acrylic/
http://sourceforge.net/projects/dhcp-dns-server/
.. but I don't have a domain name, I just have a (future) network computer name, so this is not relevant?
Editing LMHOSTS file
.. but this is just for mapping between a name and an IP address?
multiple NetBIOS names (OptionalNames)
Mentioned here:
http://www.mediamonkey.com/forum/viewtopic.php?t=51722&f=1
Which refers to:
https://serverfault.com/questions/23823/how-to-configure-windows-machine-to-allow-file-sharing-with-dns-alias
.. But that is talking about DNS, so is that relevant?
What I have succeeded in doing so far:
In Command Prompt (Run as Administrator):
net view \\localhost
or
net view \\mycomputernamehere
Lists shared folders on my PC. E.g. H:\temp Properties / Sharing, shared as "HTemp", which is listed.
So I think all I need to do is:
A. Share any folder with the desired name, e.g. "projects".
It will then be visible as "\\localhost\projects".
B. Convince Windows to use my local computer when I ask for "\\servername". I can then use "//servername/projects" in the app, which will ask Windows for "\\servername\projects", which then would be converted by Windows to "\\mycomputernamehere\projects".
... this (B) is the part I need help with. (3) above sounds like it is a solution. But to me it is rather arcane (editing the registry). Will it accomplish what I need? Is there an easy solution that doesn't involve registry editing?
And yes, somewhere along the way it dawned on me that the simplest solution is to rename my computer to "servername". I'll probably do that for this week.
But I'd still like to learn a way to alias my computer name, to fake a UNC path without actually renaming my computer. And without relying on a second computer acting as server.
This is a late answer, but for future reference:
Your suggestion of multiple NetBIOS names (OptionalNames) has worked for me to allow a Windows machine to accept UNC paths under other computer names.
For completess, you can combine this with adding the same alias's to the hosts file with the localhost ip 127.0.0.1 so IP traffic will always be redirected.
Maybe use the UNC version of localhost?
\\localhost\c$\tmp
Will map to your local c:\tmp folder.

File sharing over the internet - WebDAV / SMB / FTP

We are developing a web based application which provides a repository of users case files. Would like the user to be able to access these from their web browser with full read write capability.
For an earlier generation of our system, which was hosted on a local Linux server with Windows clients we were able to share out a folder and access it with \\server\share_name\file.doc type links. If these type of links were included in web pages (in internet explorer) and clicked on the file opened in MS Word and was savable directly into the shared folder. These type of links however only worked in IE - not FF or Chrome
Moving now to an internet based solution in our next generation of the system, we require similar functionality.
We are toying with the idea of having a WebDAV (or FTP/SFTP) share and mapping a local drive on each client machine to it to provide similar functionality. This though will probably not work well with FF or Chrome with \\server\share_name... type links. We have done brief testing and file:// links do not provide write capability once the file is opened.
As a last resort we will be able to use manual file upload dialogs, but this is not ideal and would entail additional end user training.
Has anyone any similar experience in this field and any possible solutions / best practice.
When you map remote resource as a local drive, for a browser this becomes a local drive. And browsers have only limited access to the local file system. Now when you provide a link to the browser, the browser's default behavior is to download the resource behind the link, and then let the local application process it. The browser just doesn't know how to open the remote resource locally in a different manner.
The solution would be to let the browser download something (some kind of link file) and have some local helper module (external application or browser plugin) open this link file and open the location, specified in this link file, locally. As this would be a client-side helper module, it will be able to interact with the client system and will know how to open the provided link. Given that the virtual drive letter can be different on each system (if you mount the disk to the drive letter), the helper module would need to resolve the link to point to the correct local drive. If you create a hidden virtual drive (our virtual storage products let you do this), then a link would look like "\SomeFancyNameUniqueToYourApp\Path\To\File.ext" and no resolving would be necessary. And most applications handle this type of paths fine.
I don't know for sure, but it's possible that browsers will open Windows .lnk files without a need in helper module, and with hidden virtual drive you could generate an LNK file on the server and have the browser open it locally. But this is just a guess. My bet is that you will need a helper module anyway.
ftp://username:password#hostname/ type links should work, and MS apps are getting better at handling them. still not 100% though
Try SMEStorage.com. They enable you to map local WebDav and FTP servers and access files using a Cloud Drive on Linux, Mac or Windows, and also from mobile devices (iOS, Android, BlackBerry and Windows Phone 7). You can get unique file links for each file and also secure file sharing in which the links expire.

Apache Virtual Host in Windows - how do I deal with Symbolic links?

I'm trying to run a virtual host on a WAPP stack. My virtual host has the FollowSymLinks option, but in Windows, all those symbolic links (I'm using shortcuts, and I think this may be the problem) have the .lnk extension. So if I'm trying to access settings.html, Apache can't find it because all i have sitting there is settings.html.lnk. Apologies if my question is unclear.
Apache doesn't understand shortcuts. You need to use a proper symlink. On windows this is accomplished using the command line tool mklink. See http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/ for more details.
For security reasons, symlinks aren't followed by default on Apache.
Better than enable it in the config file with "Options FollowSymLinks" you should use
http://httpd.apache.org/docs/current/urlmapping.html#outside
That's not exactly the answer you expected but may help...

Resources