Lamp Chapter3

  • Uploaded by: Niyaman
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lamp Chapter3 as PDF for free.

More details

  • Words: 310
  • Pages: 8
FOSS / LAMP Session 3

Revathi J Bharathidasan University Technology Park (BUTP) Bharathidasan University

Special permissions • A fourth permission user/group/other)

set

(in

addition

to

• Applicable in four cases:

Set user ID or suid for an executable Set group ID or sgid for an executable Set group ID or sgid for a directory Sticky bit for a directory

• Use the chmod command, preceeding the usual three digits with a digit representing the special permission : 4 for suid, 2 for sgid, 1 for the sticky bit.

Special Permissions for Executables • The Set UID Permission • Suid : Command run with permissions of the owner of the command, not exexcutor of the command • In long listing, the suid permission is displayed as a lower case “s” where the “x” would otherwise be located for the user permission.

Example - SUID • Create a new file $ touch su1

• To view the permission $ ls -l su1

• To set SUID permission $ chmod 4777 su1

• To view the modified permission $ ls -l su1

Set gid command • sgid : files created in directories with the sgid bit set have group affiliations of the group of the directory. • This is commonly used on group directories: $ chmod 2770 $ ls –l groupdir

Example • Create group

groupadd colleges

• Create users of the group useradd -G colleges jmc useradd -G colleges hcc

• Create group directory mkdir /csdata

• Assign group directory to a group chgrp colleges /csdata

• Create SGUID for group directory chmod 2770 /csdata

Special Permissions for Directories • Sticky Bit Files and directories with the sticky bit set can only be removed by the owner and root, regardless of the write permissions of the directory.

• For group directory /csdata, to set a Sticky bit chmod 3770 /csdata

Thank You

Related Documents

Lamp Chapter3
November 2019 28
Chapter3
June 2020 17
Chapter3
November 2019 29
Chapter3
June 2020 29
Chapter3
July 2020 27
Chapter3
November 2019 26

More Documents from ""

Shell Scripting
November 2019 24
Lamp Chapter3
November 2019 28
Lamp Chapter2 New
November 2019 17
Lamp
November 2019 54