Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TheElixZammuto opened this issue Mar 9, 2018 · 3 comments

Comments

@TheElixZammuto
Copy link

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.

@kamilion
Copy link
Owner

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.

@TheElixZammuto
Copy link
Author

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

@kamilion
Copy link
Owner

kamilion commented Apr 29, 2018

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 kamilion changed the title Feature Request: Make Customizer fail or warn if work directory is in a Filesystem that doesn't support permissions Feature Request: Make Customizer fail or warn if work directory is in a Filesystem that doesn't support permissions (NTFS?) Apr 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants