inode_permission(9)

inode_permission9

Check for access rights to a given inode

Usage

int inode_permission(struct inode * inode, int mask);

Arguments

inode

Inode to check permission on

mask

Right to check for (MAY_READ, MAY_WRITE, MAY_EXEC)

Overview

Check for read/write/execute permissions on an inode. We use fs[ug]id for this, letting us set arbitrary permissions for filesystem access without changing the “normal” UIDs which are used for other things.

When checking for MAY_APPEND, MAY_WRITE must also be set in mask.

Releases

4 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0
  2. 7
  3. 8
  4. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.