Set the PermissionSatus for all the linked files
@param ps
503019
protected void setPermissionStatus(PermissionStatus ps) {
    for (INodeHardLinkFile linkedFile : linkedFiles) {
      linkedFile.setPermissionStatus(ps, false);
    }
  }
1260738
public void setInboundPermissionAuthorizations(java.util.Collection<IpPermission> inboundPermissionAuthorizations) {
        if (inboundPermissionAuthorizations == null) {
            this.inboundPermissionAuthorizations = null;
            return;
        }

        this.inboundPermissionAuthorizations = new java.util.ArrayList<IpPermission>(inboundPermissionAuthorizations);
    }
839404
protected void setPermission(FsPermission permission) {
    for (INodeHardLinkFile linkedFile : linkedFiles) {
      linkedFile.setPermission(permission, false);
    }
  }
468449
public void setUserPermission(String userName, List<Permission> permissions){
        getServiceDirectoryClient().setACL(new ACL(AuthScheme.DIRECTORY, userName, PermissionUtil.permissionList2Id(permissions)));
    }
101451
public void setAcePermissionsAllowed(String acePermissionsAllowed) {

        try {
            m_acePermissionsAllowed = Integer.parseInt(acePermissionsAllowed);
        } catch (Throwable e) {
            m_throwable = e;
        }
    }
605882
public void setRoles(java.util.Collection<PermissionInfo> roles) {
        if (roles == null) {
            this.roles = null;
            return;
        }

        this.roles = new java.util.ArrayList<PermissionInfo>(roles);
    }
196139
public void setPermission (Path f, final FsPermission permission) throws IOException {
    try (Closeable context = new TimerContextWithLog(this.setPermissionTimer.time(), "setPermission", f, permission)) {
      super.setPermission(f, permission);
    }
  }
1054906
public function setPermissionsAttribute($permission)
    {
        if (! ($permission instanceof RolePermission)) {
            $permissionPart = $this->factory->create(RolePermission::class);
            $permissionPart->decodeBitwise($permission);

            $permission = $permissionPart;
        }

        $this->attributes['permissions'] = $permission;
    }
455706
@Override
  public void setPermission(Path p, FsPermission permission
      ) throws IOException {
    FsAction user = permission.getUserAction();
    FsAction group = permission.getGroupAction();
    FsAction other = permission.getOtherAction();
    
    File f = pathToFile(p);
    
    // Fork chmod if group and other permissions are different...
    if (group != other) {
      execSetPermission(f, permission);
      return;
    }
    
    boolean rv = true;
    
    // read perms
    rv = f.setReadable(group.implies(FsAction.READ), false);
    checkReturnValue(rv, p, permission);
    if (group.implies(FsAction.READ) != user.implies(FsAction.READ)) {
      f.setReadable(user.implies(FsAction.READ), true);
      checkReturnValue(rv, p, permission);
    }

    // write perms
    rv = f.setWritable(group.implies(FsAction.WRITE), false);
    checkReturnValue(rv, p, permission);
    if (group.implies(FsAction.WRITE) != user.implies(FsAction.WRITE)) {
      f.setWritable(user.implies(FsAction.WRITE), true);
      checkReturnValue(rv, p, permission);
    }

    // exec perms
    rv = f.setExecutable(group.implies(FsAction.EXECUTE), false);
    checkReturnValue(rv, p, permission);
    if (group.implies(FsAction.EXECUTE) != user.implies(FsAction.EXECUTE)) {
      f.setExecutable(user.implies(FsAction.EXECUTE), true);
      checkReturnValue(rv, p, permission);
    }
  }
834438
private function updatePermissions()
    {
        $pathNames = $this->resolver->names();
        // These should be moved to PathResolver paths eventually.
        $pathNames[] = '%web%/extensions';
        $pathNames[] = '%web%/thumbs';

        $dirMode = $this->options->getDirMode();
        foreach ($pathNames as $name) {
            $path = $this->resolver->resolve($name);
            if (!$this->filesystem->exists($path)) {
                $this->filesystem->mkdir($path);
            }
            $this->filesystem->chmod($path, $dirMode);
        }
    }
1346679
public void setPerms(String photoId, Permissions permissions) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_SET_PERMS);

        parameters.put("photo_id", photoId);
        parameters.put("is_public", permissions.isPublicFlag() ? "1" : "0");
        parameters.put("is_friend", permissions.isFriendFlag() ? "1" : "0");
        parameters.put("is_family", permissions.isFamilyFlag() ? "1" : "0");
        parameters.put("perm_comment", Integer.toString(permissions.getComment()));
        parameters.put("perm_addmeta", Integer.toString(permissions.getAddmeta()));

        Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
    }
1070348
public void setPermissions(UnsignedInteger32 permissions) {
		this.permissions = permissions;

		// Set the flag
		if (permissions != null) {
			flags |= SSH_FILEXFER_ATTR_PERMISSIONS;
		} else {
			flags ^= SSH_FILEXFER_ATTR_PERMISSIONS;
		}
	}
897072
private void setRecursivePermission(Path path, OwnerAndPermission ownerAndPermission)
      throws IOException {
    List<FileStatus> files = FileListUtils.listPathsRecursively(this.fs, path, FileListUtils.NO_OP_PATH_FILTER);

    // Set permissions bottom up. Permissions are set to files first and then directories
    Collections.reverse(files);

    for (FileStatus file : files) {
      safeSetPathPermission(file.getPath(), addExecutePermissionsIfRequired(file, ownerAndPermission));
    }
  }
789857
protected void cacheAdd(IPermissionSet ps) throws AuthorizationException {
        try {
            EntityCachingService.getEntityCachingService().add(ps);
        } catch (CachingException ce) {
            throw new AuthorizationException(
                    "Problem adding permissions for " + ps + " to cache", ce);
        }
    }
539307
private void requestPermissionsToSystem(Collection<String> permissions) {
    if (!isShowingNativeDialog.get()) {
      androidPermissionService.requestPermissions(activity,
          permissions.toArray(new String[permissions.size()]), PERMISSIONS_REQUEST_CODE);
    }
    isShowingNativeDialog.set(true);
  }
590160
public void setAcePermissionsDenied(String acePermissionsDenied) {

        try {
            m_acePermissionsDenied = Integer.parseInt(acePermissionsDenied);
        } catch (Throwable e) {
            m_throwable = e;
        }
    }
589493
public static void setPermissions(Path location, Optional<String> owner, Optional<String> group, FileSystem fs,
      FsPermission permission) {
    try {
      if (!owner.isPresent()) {
        return;
      }
      if (!group.isPresent()) {
        return;
      }
      fs.setOwner(location, owner.get(), group.get());
      fs.setPermission(location, permission);
      if (!fs.isDirectory(location)) {
        return;
      }
      for (FileStatus fileStatus : fs.listStatus(location)) {
        setPermissions(fileStatus.getPath(), owner, group, fs, permission);
      }
    } catch (IOException e) {
      log.warn("Exception occurred while trying to change permissions : " + e.getMessage());
    }
  }