Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Best way to handle illegal characters on NTFS?


    I dual boot, my home directory is mounted on an NTFS partition so that I can access all my files from within Windows (it doesn't bother me one bit that the file permissions in that are all root:root 777 as a result).

    in Linux, I occasionally save a webpage or some file gets created on the NTFS partition with a colon ( : ) or a double-quote (") or a question mark (?). Linux sees this as a non-issue. Windows, however, freaks out. if I run a chkdsk, it has issues parsing the filenames, I just recently discovered a "Found.000" directory on that drive with a bunch of files in it and I'm pretty certain it's because of this. I'm not happy about it.

    Is there a way to configure the mount in fstab to flag certain characters as illegal? or something? to save as some default character instead? Linux even lets you save files with an asterisk (*) in the filename if you're clever (or crazy) enough...

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    Use a NAS.
    You must always face the curtain with a bow.

  3. #3
    Quote Originally Posted by Irithori View Post
    Use a NAS.
    This is a laptop that I the on the go, so a networked solution wouldn't work in this case. Maybe there's a way to set up the NTFS partition as a loopback network share or something? Would Linux respect the NTFS filename limitations then?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    2,185
    For Linux NTFS is a closed source foreign filesystem. The NTFS filesystem driver for Linux is a hack. A rather good one, yes, but still a hack. I wonder if exFAT would work better for your purpose.

  6. #5
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by zeroth View Post
    my home directory is mounted on an NTFS partition so that I can access all my files from within Windows
    this is so wrong!!!
    you can have a data partition on an ntfs partition, but not your Linux $HOME!!! NO!!!!

    (it doesn't bother me one bit that the file permissions in that are all root:root 777 as a result).
    well, when things start to break you get to keep the pieces and don't say we didn't warn you.

    Is there a way to configure the mount in fstab to flag certain characters as illegal?
    no.

    or something?
    maybe.

  7. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    If it is a mobile device, use a cloud storage of your choice.
    If you dont trust the commercial ones (and there are valid reasons for that), I suggest to host https://syncthing.net/ on your own machine.

    And I agree, mounting $HOME on anything other than a local, native linux filesystem is not a good idea for permission, owner and special files reasons.
    You must always face the curtain with a bow.

  8. #7
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    2,185
    For sake of completeness, having $HOME on NFS is feasible in some cases, users can use any computer on the LAN as terminals then.

  9. #8
    It's simply a dualboot single-user laptop, nothing fancy. I can't think of any files that file permissions would be terribly important in the home directory, other than I suppose ~/.ssh since the program forces private keys to be somewhat locked-down. No, it's not pretty, but eh. I might just mount the NTFS partition into a subdirectory under ~/

    I looked into exFAT, and it is just as much proprietary and a hacked implementatiion as NTFS. I ran a test, though, and it does respect the filesystem's filename limitations. Not sure it's worth reformatting the entire partition, though

  10. #9
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    move your $HOME back into the root partition.

    identify the files you actually need in both operating systems and keep those on the ntfs partition.

    symlink the whole partition, or folder by folder, back into your $HOME.

  11. #10
    -->
    Quote Originally Posted by nihili View Post
    move your $HOME back into the root partition.

    identify the files you actually need in both operating systems and keep those on the ntfs partition.

    symlink the whole partition, or folder by folder, back into your $HOME.
    That's fine, but it doesn't solve my issue of Linux disrespecting NTFS filename restrictions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •