ãã®è¨äºãä¸è¡ã«ã¾ã¨ããã¨
ææè ãapacheå 輩ã®ãã¡ã¤ã«ãä¸æ¸ããããå 輩ã®ã°ã«ã¼ãã«å ¥ã£ã¦æ¸ãè¾¼ã¿æ¨©éããããã
人ã®å¥³ã«ã¯ããã¿ã«æãåºãã¡ããã¡
FTPã§ãã¡ã¤ã«ãä¸ãããè½ã¨ããããã¦ãã¾ãã¨ãã¨ãã©ãããã¼ããã·ã§ã³ããªããããã®ãã¡ã¤ã«ã¯æä½ã§ããªããããçãªãã¨ãè¨ããããã¨ãããã¾ãã
ããããã®ããSSHã§æ¥ç¶ãã¦ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã§ä½æãããã¡ã¤ã«ã¨ããã¦ã§ããµã¼ãã¹çµç±ã§ã¢ãããã¼ããããã¡ã¤ã«ã¨ãã§ããããrootã§ä½æããå ´åãå½ç¶ãªãããã¡ã¤ã«ã®ææè ã¯rootã§ãããã¦ã§ãããã¢ããããå ´åã¯ãè¨å®ãèªåã§ããã£ãããã¦ããªããã°ãã¾ãapacheã«ãªãã¾ããã
ä¾ãã°ä»ããããã®ãã¡ã¤ã«ãä¸æ¸ãããããç·¨éãããã®ãFTPçµç±ã§ä¸æ¸ãããããä¸ã£ç«¯ã®ãããªãFTPã¦ã¼ã¶ã¼ãã¨ãããããããrooté¨é·ãapacheå 輩ãææãã¦ãããã¡ã¤ã«ãä¸æ¸ãããããä¸å¸ã®å¥¥ãããå 輩ã®å½¼å¥³ã«æ¬²æ ãã¦ä¸ã«ã¾ããã£ã¦ãã¾ããã®ãã¨ãä¸æ¸ããããã人ã®å¥³ãèªåè²ã«ä¸æ¸ãããããã¾ãããããããã¨ã§ãã
ãããã¯éã«ãFTPçµç±ã§ã¢ãããã¼ããããã¡ã¤ã«ããapacheå 輩ãä¸æ¸ãããå ´åããããããã¡ã¤ã«ã®ãã¼ããã·ã§ã³æ¬¡ç¬¬ã§ã¯æ¨©éããªãã£ã¦è¨ããã¦å¤æ´ã¨ãã§ããªãå ´åããããWordpressãªããã§ãã¾ã«ãããããªæ°ããããã ãã©ãããã±ã¼ã¸ãä¸å¼ãFTPããã¢ãããã¦ãå¾æ¥ã管çç»é¢ãããã¼ã¸ã§ã³ã¢ããã®æ´æ°ã¨ãè¡ãªãã¨ã権éããªãããã¢ãããã¼ãã§ãã¾ããã§ããã¿ãããªãã¨ãè¨ããããã¨ãããã
ã¾ãã¨ã«ããããããªã¨ãã¯ã©ããããã£ã¦ãã話ã
æ¹æ³ã¯ããã¤ãããã
権éããªãã®ã¯ä»æ¹ãªãããããããããä¸æã«ä¸æ¸ãã¨ãããã¨ã¾ãããã¡ã¤ã«ãããããªããããåºæ¬çã«ãããããã¡ã¤ã«ã¯FTPããæä½ããªãæ¹ãç¡é£ã£ã¦å ´åãããã¨æãã
ããã§ãã©ããã¦ãä¸æ¸ããããã£ã¦ã¨ãã«ã¯ãSSHã§æ¥ç¶ããã¨ããã¦ãã¹ã¼ãã¼ã¦ã¼ã¶ã¼ããã®ãã¡ã¤ã«ãã®ãã¼ããã·ã§ã³ãå¤æ´ãããFTPã¦ã¼ã¶ã¼ã§ãä¸æ¸ãã§ããããã«ãchmodãã³ãã³ãã§ãã¼ããã·ã§ã³ãå¤ãããããchownãã³ãã³ãã§ãã¡ã¤ã«ã®ææè ãå¤ãããã
ä¾ãã°ãå¤æ´ããããã¡ã¤ã«ããsample.txtãã§ãFTPã¦ã¼ã¶ã¼ã®ååããakatsukiãã ã¨ãã¾ããããã
ããã§ãããå¤æ´ãçµãã£ãããã¾ãã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã§æ¨©éãå ã«æ»ãããã¾ãåé¡ãªããã°ãã®ã¾ã¾ã§ãè¯ãã§ããã©ã
å ´åã«ãã£ã¦ã¯æ¯åãã®æä½ãããªãããããªãããé¢åã ãã©ããããããã¯ææ ¢ã§ããã£ã¦ããã®ãªãããããªããæ¹ãããã¾ããã
ééã£ã¦ãã¡ã¤ã«ãæ¶ãã¦ãã¾ãã®ã¯ã©ãèãã¦ã俺ãæªã
httpd.confã®ä¸ã«ã¯ãUserãã¨ãGroupãã£ã¦ããè¨å®é ç®ããã£ã¦ãããã©ã«ãã§ã¯ãããapacheå 輩ã«ãªã£ã¦ã¾ããã ããããããFTPã¦ã¼ã¶ã¼ã«å¤ãã¦ãã¾ãã
ããã§apacheãåèµ·åããã°ãªã¼ã±ã¼ãã¦ã§ãä¸ã®ãã©ã¼ã ããä¸ããããããã¡ã¤ã«ã®ææè ãakatsukiã«ãªãã®ã§ãFTPä¸ã§ãä¸æ¸ããã§ããã
ãã ããã¯ãååãæ¸ããããæªã ã«ããåãã£ã¦ãªããã©ãä½ãè¯ããªãå½±é¿ãåºããããããªããã ããããããããã°èªå·±è²¬ä»»ã§ã£ã¦ãããã«èªèãã¨ããæ¹ãè¯ãããã
ã§ãåæ°ãåºãã¦apacheå 輩ã®ã°ã«ã¼ãã«å ¥ãã¦ãããã°ããã¡ã¤ã«ã®ææè ãapacheå 輩ã§ããã°ã«ã¼ãã®æ¸ãè¾¼ã¿æ¨©éã®ãããã¡ã¤ã«ã¯FTPã¦ã¼ã¶ã¼ãä¸æ¸ãã§ããããã«ãªãã
ããæ¹ã¯ç°¡åã§ããããé¡ããã¾ãå 輩ï¼ãã£ã¦è¨ãã ãã§ãªã¼ã±ã¼ãããããããç°¡åããå 輩ã®å½¼å¥³ãæ±ããã¦ãã ããï¼ãã£ã¦ãé¡ããããããé¥ãã«ç°¡åã
ããã§apacheå 輩ã®ã°ã«ã¼ãã«å ¥ãã¦ãããã¾ãããä¸è¯ã«çµ¡ã¾ãã¦ã大ä¸å¤«ããã¦ãã¼ã©ãä¸ã ããã¼ãï¼ãã¨ãã¡ã³ãåããã¦ããè¯ãã®ããã俺ã«ãããªå£èãã¦ãããã¼ãapacheå 輩ç¥ã£ã¦ãã ãï¼ã俺ããã®äººã®ä¸ã«ã¤ãã¦ã£ãããã¼ãã¨ãè¨ãè¿ãã°ãããã£ã¦æãåºãã¦ããªãã¯ãã ã
ãã ãã°ã«ã¼ãã«å ¥ãã¦ããããããã¨è¨ã£ã¦ããã¡ã¤ã«ã®ãã¼ããã·ã§ã³ãã644ãã¨ãã ã¨ãçµå±ã®ã¨ãããæ¸ãè¾¼ã¿æ¨©éã¯ãªãã§ããã664ãã¨ããããªãã¨ãã¡ã
ãªã®ã§ãããPHPã§ãã¡ã¤ã«ã®ã¢ãããã¼ãå¦çãæ¸ããããã¦ããã®ã§ããã°ãã¢ãããã¼ãå¾ã«PHPã®chmodé¢æ°ã使ã£ã¦ããã¼ããã·ã§ã³ãå¤æ´ããã®ãè¯ãã§ããã
ãããªæãã§ããã£ããã
ã¡ãªã¿ã«ãusermod以å¤ã«ããgpasswdã£ã¦ããã³ãã³ãã§ã追å ã§ããããã£ã¡ã¯è¿½å ã ããããªãã¦ã追å ããã¦ã¼ã¶ã¼ãåé¤ã¨ããã§ããããããã£ã¡ãè¦ããæ¹ãè¯ãã®ãããããªããã
usermodã®ã¨ãã¯ãã°ã«ã¼ãåã»ã¦ã¼ã¶ã¼åãã®é çªã ã£ããã©ãgpasswdã¯éã«ãªã£ã¦ãã®ã§æ³¨æã£ããã
ã¤ãã§ã«ãããã¯ã¤ã³ã¹ãã¼ã«ãã¦ããFTPãµã¼ãã¼ãvsftpdã ã£ããã£ã¦ããåæã«ãªãã¾ããã©â¦â¦vsftpd.confã®è¨å®ã§ãFTPãããã¡ã¤ã«ãã¢ãããã¼ãããã¨ãã®ãã¼ããã·ã§ã³ãå¤ãããã¨ãã§ãã¾ãã
åºæ¬çã«åæã®ç¶æ ã§ã¯ãFTPããã¢ãããã¼ãããã¨ãããã¡ã¤ã«ã®ãã¼ãã·ã§ã³ã¯ã644ãã«ãªã£ã¦ãã¨æãã¾ããå®éã«FTPã«ãã¡ã¤ã«ãä¸ãã¦ã確èªãã¦ã¿ãã°åããã¾ãã
ããã¯ãvsftpd.confã§ãããã風ã«è¨å®ããã¦ãããããªãã§ãããã ãããããå¤æ´ãã¦ãFTPããã¢ãããããã¡ã¤ã«ã®ãã¼ããã·ã§ã³ãã664ãã«ãã¦ã¿ãã
ãã¶ããvfstpd.confã¯ã/etc/vsftpd/ãã®ä¸ã«ããã¨æãã¾ãã®ã§ããããviã¢ã¼ãã§éãã¦ãlocal_umaskãã¨ããé ç®ãæ¢ããã022ãã£ã¦ãªã£ã¦ããã002ãã«å¤æ´ããã022ã£ã¦ã®ã¯ãã¼ããã·ã§ã³ã644ã§ã002ã£ã¦ã®ã¯ãã¼ããã·ã§ã³ã664ã®ç¶æ ã表ããç·¨éãå®äºãããvsftpdãåèµ·åã
ããã§FTPçµç±ã§ãã¡ã¤ã«ãã¢ããããå ´åã¯ããã¼ããã·ã§ã³ãã664ãã«ãªãã¾ãã®ã§ãã°ã«ã¼ãã®æ¸ãè¾¼ã¿ã許å¯ãããç¶æ ã«ãªãã¾ãã
ãã¡ããããã®ãã¡ã¤ã«ãapacheå 輩ãä¸æ¸ãã¨ãããããªãããã£ãã®usermodã¨ãgpasswdã§ãapacheå 輩ãFTPã¦ã¼ã¶ã¼ã®ã°ã«ã¼ãã«è¿½å ãã¦ãã ããã
ã¾ããvsftpdãããªãã¦ããunixã«ã¯umaskã£ã¦ã³ãã³ããããã¾ããããããã§ãã¡ã¤ã«ã®ããã©ã«ãã®ãã¼ããã·ã§ã³ãããããã¨å¤æ´ãããã¨ãã§ãã¾ãã
ã§ãä»åã¯ããããããªãã£ãã®ã§ãããã«ã¤ãã¦ã¯ã¾ãããããæ¸ãæ©ä¼ãããã°ãä»ã®ã¨ãã¯ãããããããã£ããã©ãåèªã°ã°ã£ã¦ãã ããã
ãããªæãã§ããã¼ã
ã¾ãæ¹æ³ã¯ä¸ã¤ãããªãã£ã¦ãã¨ã§ãã©ããã¦ãã ã©ã ã©ãæããããªãã¨ãã«ã¯ãããããªæ段ã模索ãã¦é®ããã®ãããããã£ã¦ãã¨ã§ããã
ã§ãä¸å¸ã®å¥¥ããã¨ãå 輩ã®å½¼å¥³ã«æãåºãã®ã¯æ¢ããæ¹ãè¯ãã¨æãã¾ããç´æç´åãªã®ã«å ¨ç¶çµããã®ç®å¦ãç«ããªãã¦æ´¾æã«ãã¹ãã£ã¦ãããã¸ã§ã¯ããããã®ä¿®ç¾ å ´ãè¿ãããã¨ã«ãªãããã
ããããã®ããSSHã§æ¥ç¶ãã¦ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã§ä½æãããã¡ã¤ã«ã¨ããã¦ã§ããµã¼ãã¹çµç±ã§ã¢ãããã¼ããããã¡ã¤ã«ã¨ãã§ããããrootã§ä½æããå ´åãå½ç¶ãªãããã¡ã¤ã«ã®ææè ã¯rootã§ãããã¦ã§ãããã¢ããããå ´åã¯ãè¨å®ãèªåã§ããã£ãããã¦ããªããã°ãã¾ãapacheã«ãªãã¾ããã
ä¾ãã°ä»ããããã®ãã¡ã¤ã«ãä¸æ¸ãããããç·¨éãããã®ãFTPçµç±ã§ä¸æ¸ãããããä¸ã£ç«¯ã®ãããªãFTPã¦ã¼ã¶ã¼ãã¨ãããããããrooté¨é·ãapacheå 輩ãææãã¦ãããã¡ã¤ã«ãä¸æ¸ãããããä¸å¸ã®å¥¥ãããå 輩ã®å½¼å¥³ã«æ¬²æ ãã¦ä¸ã«ã¾ããã£ã¦ãã¾ããã®ãã¨ãä¸æ¸ããããã人ã®å¥³ãèªåè²ã«ä¸æ¸ãããããã¾ãããããããã¨ã§ãã
ãããã¯éã«ãFTPçµç±ã§ã¢ãããã¼ããããã¡ã¤ã«ããapacheå 輩ãä¸æ¸ãããå ´åããããããã¡ã¤ã«ã®ãã¼ããã·ã§ã³æ¬¡ç¬¬ã§ã¯æ¨©éããªãã£ã¦è¨ããã¦å¤æ´ã¨ãã§ããªãå ´åããããWordpressãªããã§ãã¾ã«ãããããªæ°ããããã ãã©ãããã±ã¼ã¸ãä¸å¼ãFTPããã¢ãããã¦ãå¾æ¥ã管çç»é¢ãããã¼ã¸ã§ã³ã¢ããã®æ´æ°ã¨ãè¡ãªãã¨ã権éããªãããã¢ãããã¼ãã§ãã¾ããã§ããã¿ãããªãã¨ãè¨ããããã¨ãããã
ã¾ãã¨ã«ããããããªã¨ãã¯ã©ããããã£ã¦ãã話ã
æ¹æ³ã¯ããã¤ãããã
ä¸ã¤ãææ ¢ãã
ãã¨ãä¸å¸ã®å¥¥ãããå 輩ã®å½¼å¥³ããã®ãã£ã£ããç¾äººã§ãããä½ãã©ããã£ã¦ã欲æ ããã«ã¯ããããªãç¶æ ã ã¨ãã¦ããã¨ããããã¯ææ ¢ãã¦ã¿ãããã ã©ã ã©ãã¦æããããªããããææ ¢ã§ããªããã§ãä»ã®èªåã«ã¯å½¼å¥³ããªããâ¦â¦ãã£ã¦ã¨ãã«ã¯ããã¼ãâ¦â¦æ¬å½ã«ã©ããã¦ãã£ã¦ããªãããåºã«ã§ãè¡ãã°è¯ããããªãã権éããªãã®ã¯ä»æ¹ãªãããããããããä¸æã«ä¸æ¸ãã¨ãããã¨ã¾ãããã¡ã¤ã«ãããããªããããåºæ¬çã«ãããããã¡ã¤ã«ã¯FTPããæä½ããªãæ¹ãç¡é£ã£ã¦å ´åãããã¨æãã
ããã§ãã©ããã¦ãä¸æ¸ããããã£ã¦ã¨ãã«ã¯ãSSHã§æ¥ç¶ããã¨ããã¦ãã¹ã¼ãã¼ã¦ã¼ã¶ã¼ããã®ãã¡ã¤ã«ãã®ãã¼ããã·ã§ã³ãå¤æ´ãããFTPã¦ã¼ã¶ã¼ã§ãä¸æ¸ãã§ããããã«ãchmodãã³ãã³ãã§ãã¼ããã·ã§ã³ãå¤ãããããchownãã³ãã³ãã§ãã¡ã¤ã«ã®ææè ãå¤ãããã
ä¾ãã°ãå¤æ´ããããã¡ã¤ã«ããsample.txtãã§ãFTPã¦ã¼ã¶ã¼ã®ååããakatsukiãã ã¨ãã¾ããããã
//chmodã®å ´å
# chmod 777 sample.txt
//chownã®å ´å
# chown akatsuki:akatsuki sample.txt
ããã§ãããå¤æ´ãçµãã£ãããã¾ãã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã§æ¨©éãå ã«æ»ãããã¾ãåé¡ãªããã°ãã®ã¾ã¾ã§ãè¯ãã§ããã©ã
å ´åã«ãã£ã¦ã¯æ¯åãã®æä½ãããªãããããªãããé¢åã ãã©ããããããã¯ææ ¢ã§ããã£ã¦ããã®ãªãããããªããæ¹ãããã¾ããã
ä¸ã¤ãhttpd.confãããã
ããã¯ä»¥åãâã§ãæ¸ãããã¨ããããã§ãããhttpd.confã®è¨å®ã§ãã¦ã§ãã¨ãããã¢ãããããã¡ã¤ã«ã®ææè ããFTPã¦ã¼ã¶ã¼ã«ãã¦ãã¾ãããæ¹ã§ããééã£ã¦ãã¡ã¤ã«ãæ¶ãã¦ãã¾ãã®ã¯ã©ãèãã¦ã俺ãæªã
httpd.confã®ä¸ã«ã¯ãUserãã¨ãGroupãã£ã¦ããè¨å®é ç®ããã£ã¦ãããã©ã«ãã§ã¯ãããapacheå 輩ã«ãªã£ã¦ã¾ããã ããããããFTPã¦ã¼ã¶ã¼ã«å¤ãã¦ãã¾ãã
//httpd.confãç·¨é
#User apache
#Group apache
User akatsuki
Group akatsuki
ããã§apacheãåèµ·åããã°ãªã¼ã±ã¼ãã¦ã§ãä¸ã®ãã©ã¼ã ããä¸ããããããã¡ã¤ã«ã®ææè ãakatsukiã«ãªãã®ã§ãFTPä¸ã§ãä¸æ¸ããã§ããã
ãã ããã¯ãååãæ¸ããããæªã ã«ããåãã£ã¦ãªããã©ãä½ãè¯ããªãå½±é¿ãåºããããããªããã ããããããããã°èªå·±è²¬ä»»ã§ã£ã¦ãããã«èªèãã¨ããæ¹ãè¯ãããã
ä¸ã¤ãå 輩ã®ã°ã«ã¼ãã«å ¥ãã¦ããã
ç¹ã«ä½ãè¨å®ãããã£ã¦ãªããã°ããµã¼ãã¼ã«ç»é²ããã¦ãã¦ã¼ã¶ã¼ã£ã¦ã®ã¯ãåºæ¬çã«ã¿ããªä¸å¹ç¼ã§ããå¤é«ã®æ¦å£«ãã¡ã§ããã§ãåæ°ãåºãã¦apacheå 輩ã®ã°ã«ã¼ãã«å ¥ãã¦ãããã°ããã¡ã¤ã«ã®ææè ãapacheå 輩ã§ããã°ã«ã¼ãã®æ¸ãè¾¼ã¿æ¨©éã®ãããã¡ã¤ã«ã¯FTPã¦ã¼ã¶ã¼ãä¸æ¸ãã§ããããã«ãªãã
ããæ¹ã¯ç°¡åã§ããããé¡ããã¾ãå 輩ï¼ãã£ã¦è¨ãã ãã§ãªã¼ã±ã¼ãããããããç°¡åããå 輩ã®å½¼å¥³ãæ±ããã¦ãã ããï¼ãã£ã¦ãé¡ããããããé¥ãã«ç°¡åã
# usermod -G apache akatsuki
ããã§apacheå 輩ã®ã°ã«ã¼ãã«å ¥ãã¦ãããã¾ãããä¸è¯ã«çµ¡ã¾ãã¦ã大ä¸å¤«ããã¦ãã¼ã©ãä¸ã ããã¼ãï¼ãã¨ãã¡ã³ãåããã¦ããè¯ãã®ããã俺ã«ãããªå£èãã¦ãããã¼ãapacheå 輩ç¥ã£ã¦ãã ãï¼ã俺ããã®äººã®ä¸ã«ã¤ãã¦ã£ãããã¼ãã¨ãè¨ãè¿ãã°ãããã£ã¦æãåºãã¦ããªãã¯ãã ã
ãã ãã°ã«ã¼ãã«å ¥ãã¦ããããããã¨è¨ã£ã¦ããã¡ã¤ã«ã®ãã¼ããã·ã§ã³ãã644ãã¨ãã ã¨ãçµå±ã®ã¨ãããæ¸ãè¾¼ã¿æ¨©éã¯ãªãã§ããã664ãã¨ããããªãã¨ãã¡ã
ãªã®ã§ãããPHPã§ãã¡ã¤ã«ã®ã¢ãããã¼ãå¦çãæ¸ããããã¦ããã®ã§ããã°ãã¢ãããã¼ãå¾ã«PHPã®chmodé¢æ°ã使ã£ã¦ããã¼ããã·ã§ã³ãå¤æ´ããã®ãè¯ãã§ããã
chmod('sample.txt', 0644);
ãããªæãã§ããã£ããã
ã¡ãªã¿ã«ãusermod以å¤ã«ããgpasswdã£ã¦ããã³ãã³ãã§ã追å ã§ããããã£ã¡ã¯è¿½å ã ããããªãã¦ã追å ããã¦ã¼ã¶ã¼ãåé¤ã¨ããã§ããããããã£ã¡ãè¦ããæ¹ãè¯ãã®ãããããªããã
//ã¦ã¼ã¶ã¼ã®è¿½å
# gpasswd -a akatsuki apache
//ã¦ã¼ã¶ã¼ã®åé¤
# gpasswd -d akatsuki apache
usermodã®ã¨ãã¯ãã°ã«ã¼ãåã»ã¦ã¼ã¶ã¼åãã®é çªã ã£ããã©ãgpasswdã¯éã«ãªã£ã¦ãã®ã§æ³¨æã£ããã
ä¸ã¤ãvsftpd.confãããã
ããã¯ä¸»ã«ãFTPã¦ã¼ã¶ã¼ãä¸ãããã¡ã¤ã«ããapacheå 輩ãä¸æ¸ãããå ´åã«æå¹ãªæ¹æ³ã«ãªãã¾ããããã¤ãã§ã«ãããã¯ã¤ã³ã¹ãã¼ã«ãã¦ããFTPãµã¼ãã¼ãvsftpdã ã£ããã£ã¦ããåæã«ãªãã¾ããã©â¦â¦vsftpd.confã®è¨å®ã§ãFTPãããã¡ã¤ã«ãã¢ãããã¼ãããã¨ãã®ãã¼ããã·ã§ã³ãå¤ãããã¨ãã§ãã¾ãã
åºæ¬çã«åæã®ç¶æ ã§ã¯ãFTPããã¢ãããã¼ãããã¨ãããã¡ã¤ã«ã®ãã¼ãã·ã§ã³ã¯ã644ãã«ãªã£ã¦ãã¨æãã¾ããå®éã«FTPã«ãã¡ã¤ã«ãä¸ãã¦ã確èªãã¦ã¿ãã°åããã¾ãã
ããã¯ãvsftpd.confã§ãããã風ã«è¨å®ããã¦ãããããªãã§ãããã ãããããå¤æ´ãã¦ãFTPããã¢ãããããã¡ã¤ã«ã®ãã¼ããã·ã§ã³ãã664ãã«ãã¦ã¿ãã
//viã¢ã¼ãã§vsftpd.confãéã
# vi /etc/vsftpd/vsftpd.conf
//vsftpd.confãç·¨é
local_umask=022
âlocal_umask=002
//vsftpdãåèµ·å
# service vsftpd restart
ãã¶ããvfstpd.confã¯ã/etc/vsftpd/ãã®ä¸ã«ããã¨æãã¾ãã®ã§ããããviã¢ã¼ãã§éãã¦ãlocal_umaskãã¨ããé ç®ãæ¢ããã022ãã£ã¦ãªã£ã¦ããã002ãã«å¤æ´ããã022ã£ã¦ã®ã¯ãã¼ããã·ã§ã³ã644ã§ã002ã£ã¦ã®ã¯ãã¼ããã·ã§ã³ã664ã®ç¶æ ã表ããç·¨éãå®äºãããvsftpdãåèµ·åã
ããã§FTPçµç±ã§ãã¡ã¤ã«ãã¢ããããå ´åã¯ããã¼ããã·ã§ã³ãã664ãã«ãªãã¾ãã®ã§ãã°ã«ã¼ãã®æ¸ãè¾¼ã¿ã許å¯ãããç¶æ ã«ãªãã¾ãã
ãã¡ããããã®ãã¡ã¤ã«ãapacheå 輩ãä¸æ¸ãã¨ãããããªãããã£ãã®usermodã¨ãgpasswdã§ãapacheå 輩ãFTPã¦ã¼ã¶ã¼ã®ã°ã«ã¼ãã«è¿½å ãã¦ãã ããã
ã¾ããvsftpdãããªãã¦ããunixã«ã¯umaskã£ã¦ã³ãã³ããããã¾ããããããã§ãã¡ã¤ã«ã®ããã©ã«ãã®ãã¼ããã·ã§ã³ãããããã¨å¤æ´ãããã¨ãã§ãã¾ãã
ã§ãä»åã¯ããããããªãã£ãã®ã§ãããã«ã¤ãã¦ã¯ã¾ãããããæ¸ãæ©ä¼ãããã°ãä»ã®ã¨ãã¯ãããããããã£ããã©ãåèªã°ã°ã£ã¦ãã ããã
ãããªæãã§ããã¼ã
ã¾ãæ¹æ³ã¯ä¸ã¤ãããªãã£ã¦ãã¨ã§ãã©ããã¦ãã ã©ã ã©ãæããããªãã¨ãã«ã¯ãããããªæ段ã模索ãã¦é®ããã®ãããããã£ã¦ãã¨ã§ããã
ã§ãä¸å¸ã®å¥¥ããã¨ãå 輩ã®å½¼å¥³ã«æãåºãã®ã¯æ¢ããæ¹ãè¯ãã¨æãã¾ããç´æç´åãªã®ã«å ¨ç¶çµããã®ç®å¦ãç«ããªãã¦æ´¾æã«ãã¹ãã£ã¦ãããã¸ã§ã¯ããããã®ä¿®ç¾ å ´ãè¿ãããã¨ã«ãªãããã