MemCom Reference Manual > The MemCom Tools and Utilities > mcprot

Name

mcprot — Set database protection code

Synopsis

mcprot [-u pcode] [-g pcode] [-o pcode] dbname...

Description

mcprot sets the protection code of an existing MemCom database, returning the value 0 if the operation succeeds or 1 if not.[5]By default and if no otherwise specified while creating a database, MemCom creates a database with read and write protection for the user (owner) and read protection for the group. The directory protection codes of the directories above the existing MemCom database are not modified!

Parameters

-u pcode

User, i.e file owner protection code. pcode is a concatenated string of characters: r means read access. w means write access. rw means read and write access. n means no access. n suppresses r and w. Default protection code is rw, i.e the user (owner) has read and write rights.

-g pcode

Group protection code. Concatenated string of characters: r means read access. w means write access. n means no access. n suppresses r and w. Default protection code is r, i.e the group has read rights.

-o pcode

Others protection code. Concatenated string of characters: r means read access. w means write access. n means no access. n suppresses r and w. Default protection code is n, i.e others have no access rights.

dbname

Database name(s).



[5] The shell variable $? contains the return value.