3 ms·
Because permissions is an OS-enforced feature, not the filesystem feature. If you have access to the drive, permissions are meaningless.
by bufferoverflow 6y ago
Because permissions is an OS-enforced feature, not the filesystem feature. If you have access to the drive, permissions are meaningless.
- amelius 6y agoPermissions (and ownership info) can be useful even if you have complete access to a filesystem. By the way, assume you have root permission. How would you replace a single file in a random tar-file, without changing any of the permissions/userids/groupids inside the tar-file? You can't untar it because the users inside the tar file don't correspond with the ones on your system. So, you'll have to use special tools, which is (only) one demonstration of the inadequacy of the permissions mechanism of our filesystems.
- pixl97 6y agoDon't the files on disk just keep the current uid/gid anyway. You'd change one file and zip it back up. Seen plenty of files with just a number instead of an owner in the past.
- amelius 6y agoThere are two problems with this. 1. Tar also stores user and group names, which you see when you use the "v" and "t" options. 2. If you try this as non-root user, you run into permission problems.
- wokkel 6y agoNo, you use tar --numeric-owner and forget about the names.