linux¸Ä²»ÁËÊô×éÔõô½â¾ö
linuxϵͳÖÐÖ»ÓÐÎļþ»òĿ¼µÄËùÓÐÕߺͳ¬µÈÓû§²Å»ª¸ü¸ÄÆäÊô×飬ʵÑé¡°chgrp groupname filename¡±ÏÂÁî¸ü¸ÄÊô×飬ÆäÖС°groupname¡±ÊÇÄãÒª¸ü¸ÄΪµÄÐÂÊô×éÃû³Æ£¬¡°filename¡±ÊÇÒª¸ü¸ÄÊô×éµÄÎļþ»òĿ¼µÄÃû³Æ¡£
±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£
ÔÚ Linux ϵͳÖУ¬Òª¸ü¸ÄÎļþ»òĿ¼µÄÊô×é¿ÉÒÔʹÓà `chgrp` ÏÂÁî¡£ÈôÊÇÄãÎÞ·¨¸ü¸ÄÎļþ»òĿ¼µÄÊô×飬ÇëÊ×ÏÈÈ·¶¨ÄãÊÇ·ñ¾ßÓÐÕâÑù×öµÄȨÏÞ¡£Ö»ÓÐÎļþ»òĿ¼µÄËùÓÐÕߺͳ¬µÈÓû§£¨root£©²Å»ª¸ü¸ÄÆäÊô×é¡£
ÈôÊÇÄãÊÇÎļþ»òĿ¼µÄËùÓÐÕߣ¬Ôò¿ÉÒÔʵÑéÒÔÏÂÏÂÁî¸ü¸ÄÊô×飺
```bash chgrp groupname filename ```
µÇ¼ºó¸´ÖÆ
ÆäÖÐ `groupname` ÊÇÄãÒª¸ü¸ÄΪµÄÐÂÊô×éÃû³Æ£¬`filename` ÊÇÒª¸ü¸ÄÊô×éµÄÎļþ»òĿ¼µÄÃû³Æ¡£
ÈôÊÇÕâ¸öÏÂÁîÖ´ÐÐʧ°Ü£¬¿ÉÄÜÊÇÓÉÓÚϵͳÖÎÀíÔ±¸ø¶¨ÁËÌض¨Ä¿Â¼Éϵġ°Sticky Bit¡±È¨ÏÞ£¬¼´ t ȨÏÞλÉèÖÃΪ1£¬¸ü¸Ä×éȨÏ޻ᱻեȡ¡£
ÁíÍâÉÐÓпÉÄÜ·ºÆðÒÔÏÂÎÊÌâ×èÖ¹ÁËÄã¸ü¸ÄÊô×飺
ûÓÐ×ã¹»µÄ´ÅÅÌ¿Õ¼äÀ´¸üÐÂÎļþ»òĿ¼µÄÔªÊý¾Ý¡£
Îļþ»òĿ¼Òѱ»Ëø¶¨»òÕýÔÚ±»ÆäËûÀú³ÌʹÓá£
´ÅÅÌË𻵻ò¹ÊÕÏ¿ÉÄÜ»áÓ°Ïì¸ü¸Ä²Ù×÷¡£
ϸ½ÚÐèҪƾ֤ÏêϸÇéÐξÙÐÐÆÊÎö£¬¿ÉÒÔʹÓà `ls -l` »ò `stat` ÏÂÁîÉó²éÎļþ»òĿ¼µÄÄ¿½ñÊôÖ÷¡¢Êô×éÒÔ¼°ËùÓÐȨºÍȨÏÞµÈÐÅÏ¢£¬ÒÔ×ÊÖúÕï¶Ï¸ü¸Ä¹ýʧµÄÔµ¹ÊÔÓÉ¡£
ÒÔÉϾÍÊÇlinux¸Ä²»ÁËÊô×éÔõô½â¾öµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡