|
|
Subscribe / Log in / New account

A filesystem for virtualization

A filesystem for virtualization

Posted May 17, 2019 8:30 UTC (Fri) by vdanjean (subscriber, #1552)
In reply to: A filesystem for virtualization by dezgeg
Parent article: A filesystem for virtualization

> Creating a file with open(O_CREAT|O_RDWR) but giving a mode that doesn't allow write access fails. This is observable in practice by rsync/cp of files with 0444 mode failing.

This is not specific to 9p. I observed the same problem with a kerberos NFSv4 config. And git is using this pattern... My client runs the latest Linux kernel, but I do not have access to the server (probably a CentOS but I do not know its kernel version). I end up writing a small library to intercept such 'open' calls and changing them in separate system calls. I know I lost atomicity, but I gain a working git in this NFS mount. If needed, the code is here : https://gitlab.inria.fr/NGS/nfs-workaround


to post comments

A filesystem for virtualization

Posted May 17, 2019 13:38 UTC (Fri) by bfields (subscriber, #19510) [Link]

That's a bug--unfortunately, probably a bug in your server of unknown version. (You can verify who's at fault by running wireshark and seeing exactly where it's failing). NFS has always supported write opens that create read-only files.

(Basically NFS servers allow the owner of a file to override permissions and leave enforcement to the client in these cases. It's a minimal loss of security (since the owner could change the permissions anyway) to get better compatibility with local filesystem behavior.)


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