Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Mount linux 'drive' or 'folder' on Windows as a network drive?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Mount linux 'drive' or 'folder' on Windows as a network drive?

eastoncheastonch Member
edited November 2012 in General

Hi there,

Trying to figure a few things out for a simple implementation of something at home.

Currently, there's two computers in the house, one being a laptop and one being my home desktop, I'm wanting to be able to share files to the Laptop through files that're on a linux server (Dedi in OVH) Mainly for seamless integration of files and whatnot, so I can just throw files around like you would on a network storage drive.

I know people may suggest, WinSCP or FileZilla, but that's not going to sit inside of Windows Explorer is it? I'm not going to be able to fire a double click on an icon and see all my files am I, without entering a few passwords and a few unix commands or "moving" around.

The only way I can currently see it being possible is to just use WinSCP and make a user that auto logs in to the specified folder "lets say, /home/chris/personal/".

but it's not going to be as seamless as I want it, is there anything anybody has heard of, that may help me out?

Thanks,
Chris.

«1

Comments

  • Samba?

  • I'm not majorly familiar with Samba, to my understanding it's to share windows with linux, it's the oppisite of what I want.

  • OwnCloudish?

  • Mhmmm.... @HalfEatenPie

    I want to pull files when needed; so just a directory output, not the actual files. Otherwise I'd be hitting up ~50-100GB of downloads to a smaller HDD that doesnt really need it.

  • Check out DokanSSHFS

  • @eastonch said: I'm not majorly familiar with Samba, to my understanding it's to share windows with linux, it's the oppisite of what I want.

    Umm you can share linux with Windows with Samba... that's how most NAS devices implement it, and things like FreeNAS, OpenMediaVault, Openfiler, etc.. they all implement Samba to share Linux directories with Windows clients..

  • @twain would you perhaps have a handy guide to direct me? I'm literally firing blind.

  • SonicVPSSonicVPS Member
    edited November 2012

    @BronzeByte is correct - use Samba, it will do exactly what you want.

    Here is an example, I'm oversimplifying here.

    in /etc/samba/smb.conf

    [sharename]
    comment = Public Share
    path = /pathtoshare
    read only = No
    create mask = 0777
    directory mask = 0777
    guest ok = Yes

    Restart samba.

    In Windows, open command prompt:
    net use p: \\IPorhostnameofLinuxbox\sharename

    or you can just browse to it in Explorer, right click --> map network drive, however way you want to do it.

    You can change the permissions and add SMB users 'smbpasswd -a username'. If the username/password matches the Windows login, it will automatically authenticate.

  • MaouniqueMaounique Host Rep, Veteran

    you may also need that to mount ISOs for IPMI installs on blank servers.
    You may not want to allow guest on your share. There will be a valid samba user needed to access the share, most of the time.

  • Used a Ubuntu Forum guide for it; Absolutely astonished how lovely this is.... It's almost bliss.

    The only query I have, is that there seems to be a "'samba-client" for connecting linux > Windows. Does this mean, that somebody can access workgroup shared files if they were to gain access to the samba server?

  • MaouniqueMaounique Host Rep, Veteran

    This is why I said you would better not allow guests. Outside ppl will be able to see you have a share there, but you can use iptables to allow access only from your ip/range.

  • If the Ubuntu box has access to the Windows share(s), then yes. This is why permissions are important.

  • So for instance,

    I have it setup as a "smbuser -a Chris"
    [password]
    "smbuser -e Chris"

    For the connection between my Windows box and the Samba server. What's the windows share? Is that something I configure through windows itself or is that something I configure through Samba? Does it work off the "workgroup's sharing policies"?

  • MaouniqueMaounique Host Rep, Veteran

    @SonicVPS said: [sharename]

    In there is sharename, like \youriphere\sharename

  • eastoncheastonch Member
    edited November 2012
    [MyFiles]
        path = /home/chris/shared/
        browseable = yes
        read only = no
        guest ok = no
        create mask = 0644
        directory mask = 0755
        force user = chris
        force group = chris
    

    Is completely safe, right? Disabled Guest usage etc, has to be logged in from a privleged enabled account on Windows & the Samba (Chris @ Home and Chris @ samba server)?

  • MaouniqueMaounique Host Rep, Veteran

    Be careful, Chris and chris are not the same in unix. I would avoid using different type of letters, it may fail mysteriously some place.
    The rest seems ok.

  • @Maounique said: Be careful, Chris and chris are not the same in unix. I would avoid using different type of letters, it may fail mysteriously some place.

    Yep, but the same for Windows. I'm just specifically pointing this out so it's obvious to the OP.

  • Yes, if we open a file/folder in windows, caps or not, it's the same.
    But in nix, it's different :D

  • Win 7 has built-in NFS client. Can be simplier to use with *nix.

  • Thanks guys :) Totally in love with how this works.

  • netdrive on your windows client, vsftpd on your linux server.

    Not the most secure setup, or the most efficient protocol, but it's simple and works.

  • Netdrive/SSHfs/DokanSSHFs are the easiest ways to implement these.

    If you have the energy for nfs, probably the most efficient protocol for Windoze.

    Then there's SMB, and lastly, there's the native windows CIFS ( http://technet.microsoft.com/en-us/library/cc939973.aspx )

  • @Wintereise I can't think of anything simpler than what Samba was.

    I'll checkout NetDrive however.

  • craigbcraigb Member
    edited November 2012

    Netdrive looks good for not having to run samba in environments where security is a bigger concern (samba is awesome from a FOSS perspective, less so from a CVE velocity one...)

  • I actually use NetDrive to dev :x

    Le gasp!

  • MaouniqueMaounique Host Rep, Veteran

    Samba is single-threaded, ftp is much worse tho.

  • Ok, got a small niggle with this Samaba hohar.

    700KB/s when going from Linux -> Windows.

    Thought 3.5MB/s through SFTP.

    What's the deal?

  • mikhomikho Member, Host Rep

    Samba has alot of overhead. With the latency speed drops fast.

  • @MikHo I used a "net drive" SFTP, and the same speeds.... Mainly because the dev doesnt have 'segmented' downloading like WinSCP does. I'm curious in finding a solution that works.

Sign In or Register to comment.