Title.

The situation is basically this:

  • NFS works, it’s very fast, keeps the xattrs but if used without Kerberos it’s not secure. If used with Kerberos it works, but has a ticket that expires and forces me to reenter the credentials frequently in order to use it. If there was a way to use NFS with Kerberos and save the credentials NFS would be the perfect solution.

  • Samba works fine too, also keeps the xattrs but I had some troubles with filenames (mainly with some special characters, emoji, etc). Besides, as both my server and my clients run Linux I prefer to avoid it if I have the choice.

  • sshfs would be the natural choice, not as fast as NFS but it’s pretty secure, I already use it in most of my network shares but I just can’t find a way to make it preserve the files xattrs.

Do you guys have any suggestions or maybe any other options that I might use?

  • D_Air1@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    2 months ago

    The whole samba filenames thing is configurable. I only use linux systems and I ran into that same issue.

    By default samba seems to mangle file names. Not to mention that Windows systems don’t tend to support naming your files whatever you want the same way they do on linux so we need to map those characters to something else. To solve this I include a few different entries in my samba config file to fix the issue.

    mangled names = no
    vfs objects = catia
    catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6
    

    That’s just if you choose to go with samba. I only use it cause it was easier to setup than NFS when I tried.

    • CtrlAltOoops@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Hey, thanks for taking the time to reply.

      Yep, when I tried using Samba I had these catia:mappings configuration in my smb.conf. Thing is it slightly changes things (two that I specifically remember are ¿ and ¡ ), sometimes doesn’t recognizes filenames (don’t remember exactly which chars), etc.

      I tried to setup Samba, NFS and sshfs. Took a couple of days to understand a little better each one and, by trial and error, have an idea of their perks. I do appreciate your suggestion but I don’t think Samba is what I’m looking for.

  • refalo@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    forces me to reenter the credentials frequently

    Can you explain what your need is for copying files this frequently? Is this for backups? Do you always want the two sides to stay in sync? If so, something like a distributed filesystem such as gluster/ceph/etc. might work better for you.

    • CtrlAltOoops@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Sure. I have a little home server running Linux and 2 or 3 machines that access files shared by this server. I use Plasma on my desktop machines and I rely a lot on tags (just to clarify, Plasma uses xattrs - more specifically user.xdg.tags) to tag files. On the server I already have a couple of scripts that automatically insert some predefined tags on files.

      Thing is when I try to copy and/or move files between server and desktop, depending on the protocol I used to mount the shared, I loose this information.

      People suggested rsync, and it would be an excellent option if what I wanted was to keep both sides synchronized or something like that. In fact what I need is just a solution that allow me to mount a server share content and allow me to transfer files from it preserving their extended attributes, preferentially using a file manager (I use basically Dolphin or ranger).

      No need to keep then synced.