|
|
Subscribe / Log in / New account

The Linux "copy problem"

The Linux "copy problem"

Posted May 30, 2019 18:56 UTC (Thu) by jmgao (guest, #104246)
Parent article: The Linux "copy problem"

> He does think that there should be a way to create files with all of their attributes atomically, however.

Isn't there already a solution to this? You can open a file on the filesystem you want to create the file on with O_TMPFILE to hide it until you've done all of your attribute twiddling, do your fsetfilecon, fsetxattr, etc. on the file descriptor, and then use linkat to put it into place.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds