[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2.3 Changing Special Permissions

In addition to changing a file's read, write, and execute permissions, you can change its special permissions. See section 3.1 Structure of File Permissions, for a summary of these permissions.

To change a file's permission to set the user ID on execution, use `u' in the users part of the symbolic mode and `s' in the permissions part.

To change a file's permission to set the group ID on execution, use `g' in the users part of the symbolic mode and `s' in the permissions part.

To change a file's permission to stay permanently on the swap device, use `o' in the users part of the symbolic mode and `t' in the permissions part.

For example, to add set user ID permission to a program, you can use the mode:

 
u+s

To remove both set user ID and set group ID permission from it, you can use the mode:

 
ug-s

To cause a program to be saved on the swap device, you can use the mode:

 
o+t

Remember that the special permissions only affect files that are executable, plus, on some systems, directories (on which they have different meanings; see section 3.1 Structure of File Permissions). Also, the combinations `u+t', `g+t', and `o+s' have no effect.

The `=' operator is not very useful with special permissions; for example, the mode:

 
o=t

does cause the file to be saved on the swap device, but it also removes all read, write, and execute permissions that users not in the file's group might have had for it.



This document was generated on May 3, 2002 using texi2html