customizer icon indicating copy to clipboard operation
customizer copied to clipboard

Feature Request: Make Customizer fail or warn if work directory is in a Filesystem that doesn't support permissions (NTFS?)

Open TheElixZammuto opened this issue 6 years ago • 3 comments

Hi everyone and thank you for this program. I had this problem with customizer where sudo and apt were broken, and it was caused by the work directory situated in a filesystem (NTFS) that doesn't manage well permissions, and gave ownership to my host user's uid.

It can be a good idea to abort or warn the user if the permission of the chroot are altered or inapplicable.

I'd it myself but I'm not familiar with Python.

TheElixZammuto avatar Mar 09 '18 14:03 TheElixZammuto

Okay, how would you propose I detect filesystems with stupid quirks? I don't think users would be too keen on me looking around in their mounted filesystems list.

If you can work out a reasonable method to detect the problem; I can pythonize it pretty easily.

kamilion avatar Apr 26 '18 17:04 kamilion

What about creating a dummy file with particular permissions and owner and checking if there are still the same when file is created?)

TheElixZammuto avatar Apr 29 '18 10:04 TheElixZammuto

Hm, that sounds reasonable test to perform. Given that I haven't experienced the issues myself, nor do I have a valid NTFS filesystem on hand...

and I'm guessing creating one from linux isn't going to be the same as a windows-created drive, due to how windows deals with nested ACLs if the drive's got an installation of windows on it, versus just a storage drive that hasn't been installed onto.

Hm.

It's not that I can't create the dummy file; but I don't know to what I'd be comparing, or what I'd be looking for to be amiss. Can't just be a UID check, as I build most of my images from a VM that shares it's folders, and I have permissions set correctly for my environment. Checking UIDs within that environment would be problematic; as root isn't the owner of /home// for me. (it's actually uid 1000, "ubuntu", but samba maps my network username 'kamilion' to it.)

Customizer shouldn't ever be writing anything outside of it's work folder, so the check would have to be against something in ISO or FileSystem. Most of the permissions on ISO will be thrown away anyway when mkisofs is run, so that's probably the best place to perform the check, right when we're unpacking the ISO initially, but before we unsquash FileSystem. There are a number of files which are 'required' to exist, like /casper/filesystem.squashfs that we could inspect permissions on, but again, I don't know what to look for.

Honestly this seems something like "once you've made the mistake once, you'll never make it again", though. I just don't really know how to point this out, few people tend to read the wiki, most just assume customizer is simple enough and just jump right in without reading the instructions.

kamilion avatar Apr 29 '18 19:04 kamilion