On Mon, 26 Aug 2019 21:24:05 +1000, Doug Laidlaw wrote:
In "chmod 4755," what does the 4 do? Using sudo, I got "Permission
denied," but the result was 755.
The 4 of 4755 specifies "Set user ID"
To quote from man chmod, 6th paragraph under DESCRIPTION:
"A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Omitted digits are assume to
be leading zeros. The first digit selects the set user ID (4) and set
group ID (2) and restricted deletion or sticky (1) attributes. The
second digit selects permissions for the user who owns the file: read
(4), write (2), and execute (1); the third selects permissions for
other users in the file's group, with the same values; and the fourth
for other users not in the file's group, with the same values."
Cheers!
jim b.
--
UNIX is not user-unfriendly, it merely expects users to be computer-
friendly.
--- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
* Origin: A noiseless patient Spider (2:250/1@fidonet)