---
name: "vfs_suser"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vfs_suser"
---

# vfs\_suser(9)

check if credentials have superuser privileges for a mount point

## NAME

**vfs\_suser** – check if credentials have superuser privileges for a mount point

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/systm.h\>**

**#include \<sys/mount.h\>**

*int*\

**vfs\_suser**(*struct mount \*mp*, *struct thread \*td*);

## DESCRIPTION

The **vfs\_suser**() function checks if the credentials given include superuser powers for the given mount point. It will check to see if the thread passed in has the same credentials as the user that mounted the file system. If so, it returns 0, otherwise it returns what [suser(9)](/suser/9.md) would have returned.

## RETURN VALUES

The **vfs\_suser**() function returns 0 if the user has superuser powers and EPERM otherwise. This is the *reverse* *logic* of some other implementations of **suser**() in which a TRUE response indicates superuser powers.

## SEE ALSO

[chroot(2)](/chroot/2.md), [jail(2)](/jail/2.md), [suser(9)](/suser/9.md)

## HISTORY

The **vfs\_suser**() function was introduced in FreeBSD 5.2.

## AUTHORS

This manual page was written by Alfred Perlstein.
