Map<String, String[]> attributes = new HashMap<String, String[]>();
PosixFileAttributeView posixView = Files.getFileAttributeView(path, PosixFileAttributeView.class, LinkOption.NOFOLLOW_LINKS);
if (posixView != null) {
final PosixFileAttributes attr = posixView.readAttributes();
if (type.equals(ItemType.LINK)) {
attributes.put(Item.ATTRIBUTE_POSIX, new String[] { attr.group().getName(), attr.owner().getName() });
} else {
attributes.put(Item.ATTRIBUTE_POSIX, new String[] { attr.group().getName(), attr.owner().getName(), fromPermissions(attr.permissions()).toString() });
}