chmod -R 777 ./cfg/
rwx權限數字解釋
chmod也可以用數字來表示權限如 chmod 777 file
語法爲:chmod abc file
其中a,b,c各爲一個數字,分別表示User、Group、及Other的權限。
r=4,w=2,x=1
若要rwx屬性則4+2+1=7;
若要rw-屬性則4+2=6;
若要r-x屬性則4+1=7。
示例:
chmod a=rwx file 和 chmod 777 file 效果相同;
chmod ug=rwx,o=x file 和 chmod 771 file 效果相同;
若用chmod 4755 filename可使此程序具有root的權限