µ±Ç°Î»ÖãºK88Èí¼þ¿ª·¢ ¡ú ÎÄÕÂÖÐÐÄ ¡ú µçÄÔ»ù´¡ ¡ú »ù´¡Ó¦ÓÃ05 ¡ú ÎÄÕÂÄÚÈÝ

ΪʲôLinuxϵͳӵÓÐwȨÏÞÈ´ÎÞ·¨É¾³ýÎļþ£¿

¼õС×ÖÌå Ôö´ó×ÖÌå ×÷Õߣº»ª¾ü  À´Ô´£º²»Ïê  ·¢²¼Ê±¼ä£º2019-1-31 15:37:59

¡¡ÏÂÃæ¾ÍÀ´¾ßÌåÑÝʾһÏÂɾ³ýÎļþµÄ³¡¾°£¬¸ø´ó¼Ò½éÉÜΪʲôLinuxϵͳӵÓÐwȨÏÞÈ´ÎÞ·¨É¾³ýÎļþ¡£¡¡¡¡³¡¾°Ä£Ä⣺¡¡¡¡root Óû§¡¡¡¡£Ûroot@mode-6 ~£Ý# mkdir /oldboy/¡¡¡¡£Ûroot@mode-6 /£Ý# ll /oldboy/ -d¡¡¡¡drwxr-xr-x 2 root root 4096 Nov 27 15:46 /oldboy/¡¡¡¡£Ûroot@mode-6 ~£Ý# cd /oldboy/¡¡¡¡£Ûroot@mode-6 oldboy£Ý# vim test1.sh¡¡¡¡echo ‘My name Is ZhangLiang.’¡¡¡¡£Ûroot@mode-6 oldboy£Ý# ll¡¡¡¡total 4¡¡¡¡-rw-r--r-- 1 root root 30 Nov 27 15:44 test1.sh¡¡¡¡ÆÕͨÓû§¡¡¡¡£Ûoldboy@mode-6 oldboy£Ý$ cat test1.sh¡¡¡¡echo ‘My name Is ZhangLiang.’¡¡¡¡£Ûoldboy@mode-6 oldboy£Ý$ echo “12312” ¡·¡· test1.sh¡¡¡¡-bash£º test1.sh£º Permission denied # ȨÏÞ²»×ã¡¡¡¡£Ûoldboy@mode-6 oldboy£Ý$ ¡£/test1.sh¡¡¡¡-bash£º ¡£/test1.sh£º Permission denied# ȨÏÞ²»×ã¡¡¡¡root Óû§¡¡¡¡£Ûroot@mode-6 oldboy£Ý# chmod 747 test1.sh¡¡¡¡£Ûroot@mode-6 oldboy£Ý# ll¡¡¡¡total 4¡¡¡¡-rwxr--rwx 1 root root 30 Nov 27 15:44 test1.sh¡¡¡¡ÕâÊÇÔÚʹÓÃÆäËûÓû§½øÐÐ rwx²Ù×÷¶¼¿ÉÒԳɹ¦Ö´ÐС£µ«ÊǽøÐÐɾ³ý²Ù×÷ʱȴʧ°Ü¡¡¡¡£Ûoldboy@mode-6 oldboy£Ý$ rm -f test1.sh¡¡¡¡rm£º cannot remove `test1.sh‘£º Permission denied # ȨÏÞ²»×ã¡¡¡¡ÆäÖÐÎļþÃû³Æ±£´æÔÚÉϼ¶Ä¿Â¼µÄblock ÖУ¬ËùÒÔÄÜ·ñ¶ÔÎļþ½øÐÐɾ³ý£¬ÊÇ¿´Éϼ¶Ä¿Â¼ÊÇ·ñÓÐÏàÓ¦µÄ w ȨÏÞ¡£¡¡¡¡£Ûroot@mode-6 /£Ý# ll /oldboy/ -d¡¡¡¡drwxr-xr-x 2 root root 4096 Nov 27 15:46 /oldboy/# ÆäËûÓû§Ã»ÓÐ w ȨÏÞ¡£ËùÒÔ²»ÄÜɾ³ý¡¡¡¡£Ûroot@mode-6 /£Ý# chmod 757 ¡£/oldboy/# root Óû§¡¡¡¡£Ûroot@mode-6 /£Ý# ll /oldboy/ -d¡¡¡¡drwxr-xrwx 2 root root 4096 Nov 27 15:46 /oldboy/ # ȨÏÞÒÑÐ޸ġ¡¡¡£Ûoldboy@mode-6 oldboy£Ý$ rm -f test1.sh # ÆÕͨÓû§ ¿ÉÒԳɹ¦É¾³ýÁË¡¡¡¡¶ÔÓÚĿ¼À´Ëµ rwx¡¡¡¡ÆäÖÐr £º´ú±í¶ÁȡĿ¼ÖеÄÄÚÈÝ¡¡¡¡w£ºÉ¾³ý¡¢ÐÞ¸Ä Ä¿Â¼ÀïÃæÎļþÃûµÄȨÏÞ ¡¾±ØÐëÅäºÏ x Ö´ÐвſÉÒÔ¡¿¡¡¡¡x£º´ú±íÄÜ·ñ½øÈ뵽Ŀ¼ÀïÃæÈ¥       ºÃÀ²£¬ÒÔÉϾÍÊÇ»ª¾üС±à´ø¸ø´ó¼ÒµÄÈ«²¿ÄÚÈÝÁË£¬ÊDz»ÊǺܼòµ¥ÄØ£¿Äãѧ»áÁËô£¿ÏëÁ˽â¸ü¶àµÄÏà¹ØÄÚÈÝ£¬ÇëËæʱ¹Ø×¢»ª¾ü×ÊѶ¶¯Ì¬°É£¬»¶Ó­µ½»ª¾üÀ´ÏÂÔØŶ£¡

ΪʲôLinuxϵͳӵÓÐwȨÏÞÈ´ÎÞ·¨É¾³ýÎļþ£¿