private static String permissionToString(FsPermission p) {
    return (p == null) ? "default" : "-" + p.getUserAction().SYMBOL
        + p.getGroupAction().SYMBOL + p.getOtherAction().SYMBOL;
  }
Converts a Hadoop permission into a Unix permission symbolic representation
(i.e. -rwxr--r--) or default if the permission is NULL.

@param p Hadoop permission.
@return the Unix permission symbolic representation or default if the
permission is NULL.
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java