73 lines
1.1 KiB
Groff
73 lines
1.1 KiB
Groff
.Dd $Mdocdate: February 1 2026 $
|
|
.Dt CAN 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm can
|
|
.Nd query filesystem permissions
|
|
.Sh SYNOPSIS
|
|
.Nm can
|
|
.Op Fl GghqU
|
|
.Ar user
|
|
.Ar action
|
|
.Ar path
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
utility displays
|
|
.Dq yes
|
|
if the
|
|
.Ar user
|
|
can perform the specified
|
|
.Ar action
|
|
on the
|
|
.Ar path ,
|
|
and
|
|
.Dq no
|
|
otherwise.
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width xxxxxxxxxxxxx
|
|
.It Fl G , \-gid
|
|
Interpret
|
|
.Ar user
|
|
as a group id instead of a user name.
|
|
.It Fl g , \-group
|
|
Interpret
|
|
.Ar user
|
|
as a group name instead of a user name.
|
|
.It Fl h , \-help
|
|
Display a brief help message.
|
|
.It Fl q , \-quiet
|
|
Do not display
|
|
.Dq yes
|
|
or
|
|
.Dq no ,
|
|
just exit with the appropriate exit code (see
|
|
.Sx EXIT STATUS ) .
|
|
.It Fl U , \-uid
|
|
Interpret
|
|
.Ar user
|
|
as a user id instead of a user name.
|
|
.El
|
|
.Pp
|
|
The following actions are recognized:
|
|
.Bl -tag -width xxxxxxxxxxxxx
|
|
.It Cm read
|
|
Check for read permission.
|
|
.It Cm write , edit
|
|
Check for write permission.
|
|
.It Cm execute , run
|
|
Check for execute permission.
|
|
.El
|
|
.Sh EXIT STATUS
|
|
The
|
|
.Nm
|
|
utility exits 0 if the
|
|
.Ar user
|
|
can perform the specified
|
|
.Ar action
|
|
on the
|
|
.Ar path ,
|
|
and >0 otherwise or if an error occurs.
|
|
.Sh SEE ALSO
|
|
.Xr inode 7
|