Oracle Solaris ZFS-Administrationshandbuch

Löschen von ZFS-Zugriffsrechten (Beispiele)

Mit dem Befehl zfs unallow lassen sich übertragene Zugriffsrechte wieder löschen. Beispielsweise verfügt Benutzer cindys über die Zugriffsrechte zum Erstellen, Löschen, Einhängen und Anfertigen von Snapshots im Dateisystem tank/cindys.


# zfs allow cindys create,destroy,mount,snapshot tank/cindys
       # zfs allow tank/cindys
       -------------------------------------------------------------
       Local+Descendent permissions on (tank/cindys)
               user cindys create,destroy,mount,snapshot
       -------------------------------------------------------------

Mit der folgenden zfs unallow-Syntax entziehen Sie das Zugriffsrecht von Benutzer cindys zum Erstellen von Snapshots für das Dateisystem tank/cindys:


# zfs unallow cindys snapshot tank/cindys
# zfs allow tank/cindys
-------------------------------------------------------------
Local+Descendent permissions on (tank/cindys)
        user cindys create,destroy,mount
-------------------------------------------------------------
cindys% zfs create tank/cindys/data
cindys% zfs snapshot tank/cindys@today
cannot create snapshot 'tank/cindys@today': permission denied

Betrachten wir als weiteres Beispiel die nachfolgenden Zugriffsrechte des Benutzers marks in tank/marks:


# zfs allow tank/marks
-------------------------------------------------------------
Local+Descendent permissions on (tank/marks)
        user marks create,destroy,mount
-------------------------------------------------------------

In diesem Beispiel werden mit der folgenden zfs unallow-Syntax alle Zugriffsrechte für Benutzer marks von tank/marks gelöscht:


# zfs unallow marks tank/marks

Die folgende zfs unallow-Syntax löscht einen Zugriffsrechtsatz für das Dateisystem tank.


# zfs allow tank
-------------------------------------------------------------
Permission sets on (tank)
        @myset clone,create,destroy,mount,promote,readonly,snapshot
Create time permissions on (tank)
        create,destroy,mount
Local+Descendent permissions on (tank)
        group staff create,mount
-------------------------------------------------------------
# zfs unallow -s @myset tank
$ zfs allow tank
-------------------------------------------------------------
Create time permissions on (tank)
        create,destroy,mount
Local+Descendent permissions on (tank)
        group staff create,mount
-------------------------------------------------------------