Adding folder with a space to fstab

I want to auto-mount a disk with the folder named Lord Lance but whenever I try to do so I get a parsing error. If I remove the space and change it to lordlance then I get no such issues.

UUID=A2F647BFF6479309 "/run/media/lance/Lord Lance/" ntfs defaults 0 0

I tried changing it to single quote and using character escaping (without quotes) but to no avail.

Side-question: Why is /mnt/ recommended as the location for external hard disk (as the name might suggest) but Manjaro loads the disk in /run/media/(user)?

/etc/fstab is a flat database, with each line being a record and each space-separated item a field in the record. Therefore, it is best not to have anything in there that contains spaces.

systemd mounts all removable and non-system storage under /run/media. But /mnt is the preferred mountpoint for the manual mounting of removable storage or disk partitions that are not part of the system.

P.S.: This has nothing to do with the kernel. Moved to Support.

/etc/fstab is a flat database, with each line being a record and each space-separated item a field in the record. Therefore, it is best not to have anything in there that contains spaces.

Oh so basically I am forced to use underscores to demarcate words?

P.S.: This has nothing to do with the kernel. Moved to Support.

True. I didn’t know which sub-category it fit into. Thanks.

Yes. Or just make it into a single word.

Figured it out for those who want a space in their folder name: Use \040.

This is what my fstab entry looks like:
UID=A2F647BFF6479309 /mnt/Lord\040Lance ntfs defaults 0 0

Works like a charm.

You might want to review that line.

First of all, ntfs as the filesystem type will make your NTFS mount read-only. If you need write access, you should use ntfs-3g.

Secondly, defaults is meaningless when using an NTFS mount. It won’t apply the proper permissions for that volume to the mountpoint in the virtual filesystem layer. See… :arrow_down:

man mount
1 Like

Secondly, defaults is meaningless when using an NTFS mount. It won’t apply the proper permissions for that volume to the mountpoint in the virtual filesystem layer. See… :arrow_down:

man mount

Right it’s a 1600 line document. Could you tell me what exactly I should be searching for?

Documentation: man fstab

Instead of going into fstab use Gnome-Disk to change the mount points and set it for auto-mount. Sooooo much simplier.

1 Like

So the fact that I am running KDE won’t matter?

There’s a section pertaining to filesystem-specific mount options, and NTFS is included.

you refer to the suggestion to use “Gnome-Disks”?

It may only matter in that when you install that program, a lot of GTK and Gnome dependencies might be needed and you end up installing a lot of stuff just to be able to use that one program.

But I did not check - try it and see?

When you select to install it, you will be shown everything that will be installed along with it before you commit to the action.

Perhaps there is a KDE/Plasma native equivalent - I don’t know.

There’s a section pertaining to filesystem-specific mount options, and NTFS is included.

I did some Googling and changed my fstab line to:
UUID=A2F647BFF6479309 /mnt/Lord\040Lance ntfs-3g defaults,nls=utf8,umask=000,dmask=077,fmask=077,uid=1000,gid=1001 0 0

I am the only person on the PC so permission for others and of the group does not matter. I assume UTF-8 is the standard and my gid was 1001 according to the Terminal.

1 Like

There aren’t a TON of extras installed it’s straight forward.

Ha Gnome Disks was indeed much easier and the options it set automatically were also quite different. Since I was recommended to use it, I assume the default settings are A-OK.

Thanks, @Nachlese!

2 Likes

thank @Locutus for the tip - I just had an opinion on it :grin: