src/main/java/com/upplication/s3fs/util/S3Utils.java
public Set<PosixFilePermission> toPosixFilePermission(Permission permission) {
        switch (permission) {
            case FullControl:
                return Sets.newHashSet(PosixFilePermission.OWNER_EXECUTE,
                        PosixFilePermission.OWNER_READ,
                        PosixFilePermission.OWNER_WRITE);
            case Write:
                return Sets.newHashSet(PosixFilePermission.OWNER_WRITE);
            case Read:
                return Sets.newHashSet(PosixFilePermission.OWNER_READ);
            case ReadAcp:
                return Sets.newHashSet(PosixFilePermission.OWNER_READ);
            case WriteAcp:
                return Sets.newHashSet(PosixFilePermission.OWNER_EXECUTE);
        }
        throw new IllegalStateException("Unknown Permission: " + permission);
    }
/**
     * transform a com.amazonaws.services.s3.model.Permission to a java.nio.file.attribute.PosixFilePermission
     * We use the follow rules:
     * - transform only to the Owner permission, S3 doesnt have concepts like owner, group or other so we map only to owner.
     * - ACP is a special permission: WriteAcp are mapped to Owner upload permission and ReadAcp are mapped to owner read
     *
     * @param permission Permission to map, mandatory must be not null
     * @return Set PosixFilePermission never null
     */
transform a com.amazonaws.services.s3.model.Permission to a java.nio.file.attribute.PosixFilePermission
We use the follow rules:
- transform only to the Owner permission, S3 doesnt have concepts like owner, group or other so we map only to owner.
- ACP is a special permission: WriteAcp are mapped to Owner upload permission and ReadAcp are mapped to owner read

@param permission Permission to map, mandatory must be not null
@return Set PosixFilePermission never null
transform a com . amazonaws . services . s3 . model . Permission to a java . nio . file . attribute . PosixFilePermission We use the follow rules : - transform only to the Owner permission S3 doesnt have concepts like owner group or other so we map only to owner . - ACP is a special permission : WriteAcp are mapped to Owner upload permission and ReadAcp are mapped to owner read @param permission Permission to map mandatory must be not null @return Set PosixFilePermission never null
public Set<PosixFilePermission> toPosixFilePermission(Permission permission) {
        switch (permission) {
            case FullControl:
                return Sets.newHashSet(PosixFilePermission.OWNER_EXECUTE,
                        PosixFilePermission.OWNER_READ,
                        PosixFilePermission.OWNER_WRITE);
            case Write:
                return Sets.newHashSet(PosixFilePermission.OWNER_WRITE);
            case Read:
                return Sets.newHashSet(PosixFilePermission.OWNER_READ);
            case ReadAcp:
                return Sets.newHashSet(PosixFilePermission.OWNER_READ);
            case WriteAcp:
                return Sets.newHashSet(PosixFilePermission.OWNER_EXECUTE);
        }
        throw new IllegalStateException("Unknown Permission: " + permission);
    }
public Set < PosixFilePermission > toPosixFilePermission ( Permission permission ) { switch ( permission ) { case FullControl : return Sets . newHashSet ( PosixFilePermission . OWNER_EXECUTE , PosixFilePermission . OWNER_READ , PosixFilePermission . OWNER_WRITE ) ; case Write : return Sets . newHashSet ( PosixFilePermission . OWNER_WRITE ) ; case Read : return Sets . newHashSet ( PosixFilePermission . OWNER_READ ) ; case ReadAcp : return Sets . newHashSet ( PosixFilePermission . OWNER_READ ) ; case WriteAcp : return Sets . newHashSet ( PosixFilePermission . OWNER_EXECUTE ) ; } throw new IllegalStateException ( "Unknown Permission: " + permission ) ; }
transform a com.amazonaws.services.s3.model.Permission to a java.nio.file.attribute.PosixFilePermission
 We use the follow rules:
 - transform only to the Owner permission, S3 doesnt have concepts like owner, group or other so we map only to owner.
transform a com . amazonaws . services . s3 . model . Permission to a java . nio . file . attribute . PosixFilePermission We use the follow rules : - transform only to the Owner permission S3 doesnt have concepts like owner group or other so we map only to owner .