public void setPermission ( String src , FsPermission permission ) throws IOException { checkOpen ( ) ; clearFileStatusCache ( ) ; try { namenode . setPermission ( src , permission ) ; } catch ( RemoteException re ) { throw re . unwrapRemoteException ( AccessControlException . class , FileNotFoundException . class ) ; } }
Set permissions to a file or directory .