On 2013-07-02, at 11:44, Sven Van Caekenberghe <[email protected]> wrote:
> Hi Thierry, > > On 02 Jul 2013, at 11:34, Goubier Thierry <[email protected]> wrote: > >> Hi all, >> >> it seems FileSystem permissions are not working at all like intended in >> Linux, and it's the case in both 2.0 and 3.0 (but it 3.0 it has the elegance >> of rendering the file browser and all file dialogs unusable :(). >> >> https://pharo.fogbugz.com/f/cases/11102/FileSystemError-Path-root >> >> (an entry like drwx------ 10 root root 4096 mai 15 13:26 /root is readable >> according to FileReference :() >> >> Is there any point in the vm to do a fstat/stat ? > > I think the basic information is there, see > FileSystemDirectoryEntry>>posixPermissions. It seems that the way that > information is subsequently handled in Pharo is wrong, or at least way too > simple. The question is of course, what is a good cross platform API. Mac OS > X & Linux will be quite similar, but Windows ? The problem is deeper that the mere permissions. The permissions only look at the POSIX permissions returned by fstat/stat, but it does not respect the current user. The problem you find is rather that all the other FS primitives do not know how to deal with permissions. The following code yields an error since the primitive signals a "Directory Not Found" which should not happen: (FileSystem root / 'lost+found') exists ifTrue: [ (FileSystem root / 'lost+found') hasChildren ].
