LoginSignup
2
0

More than 3 years have passed since last update.

【Laravel】エラー Fatal Error Unable to create lock file: Bad file descriptor (9)

Posted at

php artisan serve で、サーバーが起動できなくなった。

原因

  • 全ユーザーが書き込み可能なハズのtmpディレクトリに、書き込み権限がなくなってた。。パーミッションエラー!

解決方法

権限を与えて解決
% ls -ld /private/tmp             // 確認
  drwxr-xr-x  22 root  wheel  704 11 15 16:59 /private/tmp
         // ↑ tがない
% sudo chmod 1777 /private/tmp   // 権限を付与
% ls -ld /private/tmp            // 確認   
  drwxrwxrwt  22 root  wheel  704 11 15 16:59 /private/tmp
         // ↑ tがついた
% php artisan serve             // 起動できた
  • パーミッションのマーク : 「 t 」って?
    • スティッキービット(Sticky Bit、全ユーザーが書き込みを行える権限)のこと。
    • 削除は、所有者とrootだけ可能。
スティッキービットを設定方法
% chmod 1777 ディレクトリ名      // パーミッション値 +1000
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0