Wednesday, January 7, 2009

chmod

Set home directory
chmod g+s (chmod 2755)

s mean SUID(set-user-ID-on-execution)
or SGID(set-group-ID-on-execution)

While user execute those file, his rights same as user/group.
Example passwd:
#ls -l /usr/bin/passwd
-r-sr-xr-x 5 root bin 49152 May 24 2001 /usr/bin/passwd

Only root can change password, which this setting, user can change their own password.

Remark: X-term experience.

No comments: