RFR 8213031: (zipfs) Add support for POSIX file permissions

Alan Bateman Alan.Bateman at oracle.com
Wed Feb 13 15:33:33 UTC 2019


On 12/02/2019 21:57, Langer, Christoph wrote:
> Hi Alan, all,
>
> here comes the next proposal for POSIX support in jdk.zipfs - which hopefully represents the converged solution, at least in its overall design.
I don't have time to do a detailed code review right now but I did read 
the updated proposal and javadoc. Overall I think this looks good, 
meaning opt-in seems right, as does allow specifying configuration to 
newFileSystem to override defaults.

I think the javadoc changes will need a few iterations but we can get to 
that once some of the finer details are sorted out. For example, "Posix 
Support" isn't quite right as this is about optional support for the 
POSIX view of file attributes rather than complete support for POSIX. 
Also the "Zip" view of file attributes will need to be fleshed out more 
(the view name for example).

I'm not sure about using ${user.name} and "<zipfs_default>" as default.  
Have you looked at using the zip file owner/group (or owner/owner on 
Windows) as the default?  Also just wondering if 777 might be more 
appropriate (maybe you have a reason for choosing 660?). It might be 
useful to see what Linux, macOS and other operating systems do when 
mounting a FAT file system.

The names of the defaultXXX properties when configuring the zip file 
look okay.

Did you consider using the string representation of the user, group and 
permissions in the configuration properties? The zip file system 
provider could support both of course. String might make it a bit easier 
to create the map of configuration properties when creating the file 
system e.g
Map.of("enablePosixPermissions", "true", "defaultOwner", "joe", 
"defaultPermissions", "rw-rw---");

-Alan



More information about the core-libs-dev mailing list