Le 17 févr. 2011 à 14:44, Ingo Weinhold a écrit : > > On 2011-02-17 at 14:19:31 [+0100], Stephan Assmus <superstippi@xxxxxx> wrote: >> At FOSDM one interesting discussion developed on permissions and >> extended file attributes. Suppose (once Haiku is fully multi-user) user >> A is able to read/write a text file. User B can read/write the same >> file. Both might be using PE as their text editor of choice. Each one of >> them would get the view state of the text file restored when they open >> it in PE and see the state (scroll offset, selection) of the other user, >> when that user last opened the file. > > This multi-user and Haiku issue had already been discussed long ago (probably > multiple times). The simplest solution is to put only actual meta data into > attributes (e.g. for audio files run length, genre, etc.), but store user > settings in the user's settings directory (e.g. personal rating, if the files > are shared). Same issue with plain files and folders, like Vision storing logs in its own app folder though only root would be able to... >> But it's certainly interesting to think about this, and it >> may just be the reason why other operation systems use extended >> attributes only for system level meta data, like access control lists. > > I believe at least for Linux that has more likely to do with the fact that > not all distributions used to enable xattr support by default (does Ubuntu > nowadays?), so application developers couldn't really rely on it. Also, > without query support attributes are only half as useful -- e.g. there's no > point to expose mail header fields as attributes. Yes, and also the fact that they aren't maintained correctly when moving stuff around. >> Still, I wouldn't want to miss extended file attributes the way they are >> used in Haiku. > > Well, we'll have to change a few things when we go multi-user (mainly moving > settings out of the attributes), but the more interesting stuff will remain > the same, I suppose. I wrote and submitted this last year at EuroSys (but the Haiku poster won): http://revolf.free.fr/beos/xattr-interop-abstract.pdf I still intend to get something done with it. Comments welcome. François.