I setup an old laptop as dual boot Windows10 & Linux. If the processors had been more powerful and I had more RAM, I would run one OS in a virtual machine. I set up a shared drive so both OSes could access it. I was trying to change some file permissions in Linux in the share and they wouldn’t change. I thought I’d formatted the share to FAT32. I checked it and I’d forgotten that I made it NTFS (based on recommendations). Doh. It’s POSIX compliant, but need special software to change perms.

@londubh What perms were you trying to set?

AFAIR vfat doesn't permit setting any file permissions via standard methods (e.g., chmod). It also doesn't have the notion of file ownership (user and group associations). Both are defined for the filesystem.

Instead you define both of these at mount time through mount arguments. These include uid, gid, umask, and dmask. The mask values apply to regular files and directories respectively.

https://linux.die.net/man/8/mount Search for "Mount options for fat" and "Mount options for vfat".

#linux #vfat #filesystems

mount(8): mount filesystem - Linux man page

mount -a [-t type] [-O optlist] (usually given in a bootscript) causes all filesystems mentioned in fstab (of the proper type and/or having or not having ...

@dredmorbius I was trying to ssh into an Amazon virtual server (can’t remember product name) and it bitched the pem file had open permissions like 777 and I needed to lock them down to like 400. So when I tried chmod nothing changed. I’ve only gotten as far as knowing I have to use a different tool for the NTFS drive.

@londubh I'd think that you'd be able to set/change permissions, but (depending on the mount system used), NTFS may also require mount-time arguments for file user & group owners and masks. See:

https://linux.die.net/man/8/ntfs-3g

Based on a nine-year-old ServerFault post and response:

https://serverfault.com/a/522362

https://serverfault.com/questions/513494/permissions-on-files-created-by-linux-in-ntfs

See also: https://askubuntu.com/questions/223016/setting-permission-for-ntfs-partition

I think you'll want a mask of 077. That should disable all group/world access.

ntfs-3g(8) - Linux man page

ntfs-3g is an NTFS driver, which can create, remove, rename, move files, directories, hard links, and streams; it can read and write files, including ...