Forum › Forums › General › Software › antiXPUSB to test › Reply To: antiXPUSB to test
I believe this step is needed because the format was done as root,
Yes, you are on the right trace I think. Gparted runs as root to be able to access the device on /dev level for creating a new partition table.
Just chown-ing the root directory of the new partition should be enough … The setfacl and chmod lines are only needed to allow other group members (e.g. members of “users”) write access as well
Precisely this is the point. My default user is not 1000. Even when chowning, I noticed I have to repeat this step each and every time I replug the stick. Additionally, when using the stick for transport to/from another Live antiX, the default “demo” user 1000 there can’t do anything on it, and I have to write files and create folders as root, and then changing the permissions and ownership of each and everything manually in zzzFM or on console afterwards when back on another system. OK, I could let zzzFM do that recursively, and then again recursively set back everything for each other user later. The problem is: Only a single user gets access after this time consuming operation (think of GiB size drives). Under aspect of security/data protection this is useless, the restriction to single user isn’t protecting anything; root always can read everything anyway. (Just an idea: If it’s really about data protection and security, we should provide in the formatusb tool the ability to set up a luks encrypted partition, and add in zzzFM a handler to open and mount luks encrypted partitions, the same way like it opens default partitions from its devices field. Or maybe an udevil rule, asking the user for credentials when a device with a luks container on it is being plugged, and mounting the partition then for him. Unplugdrive already handles the proper closing of luks afterwards (even when its non-sudo mode currently needs some maintenance: pumount again must be fixed like @Xecure did originally already.)
But the idea of this aPUSB script is to let with a simple click (once there is a gui) prepare a non behaving USB stick formatted in tools not caring (like gparted), right in the beginning once and forever in a way universally usable, so all these repeated recursive chown actions later in use are no longer needed.
Windows is like a submarine. Open a window and serious problems will start.