What is the difference between suid and another permission (peace permission)?

In simple words, users will receive the permissions of the file owners, as well as the owner UID and GID when executing the file / program. This will not change the owner of the file.

If you entered the program: rwsrwxr-- or rwxr - rwx

What is the difference if I set the SUID permission (for owners) or World permission (other)? in both cases, the user can run the program?

+4
source share
3 answers

rwxr-rwx, "", , , , , - .

rwsrwxr - ""

, x , SUID, , .

Btw, SUID, , SUID ( ) bash

+1

, , , . , suid .

, , suid , , , suid bit , , suid bit , , . , , suid x () perm.

0

.

, , suid, onwer.

For example, a command passwdwill read and write to / etc / shadow with permission rw-r-----, but you can call this command, why? reason hidden in suid problem.

because by using the suid bit_ function, you run the application as user user permission, and not another user permission

0
source

Source: https://habr.com/ru/post/1673339/


All Articles