I'm writing a tar implementation for a package manager, and I wonder if I can skip the permission setting of the user in the tar headers and keep what is there by default, the user who wrote the files, in my case root.Would this present a problem? The package manager is designed to not write anything inside /home.
Are all files outside of /home/userabc owned by root?
files;arch linux;directory structure;chown
Most but not all files that are part of the system are owned by the root user. It's rare for system files not to be owned by root, because a user that owns system files can modify them and this is usually not desirable. It's a lot more common to have files that are owned by a group other than root, and that have mode 660 or 664 or 640.It's possible to design a Unix system where all system files (outside of /dev, /home, and the parts of /var containing user data such as mailboxes and crontabs) are owned by root. I don't know whether this is the case for Arch Linux. But not allowing files to be owned by a different group would significantly restrict the security protections of the system, it wouldn't be viable. So you'll need to remember group ownership anyway. Why not remember user ownership as well?