Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
pyinotify特定のディレクトリ内のファイルへのアクセスや変更などを検出するために使用しています。パッチinotifyを適用することなく、どのプロセスがその原因であるかを見つける簡単な方法はありますか?
pyinotify
inotify
Linuxを使用していると仮定すると(pyinotifyはこれを示す傾向があります)、SELinux(もちろんpermissiveモードで実行)を使用してプロセスをラップし、すべてのファイルアクセス/作成/削除/などをログに記録できます.
いいえ、できません。その情報はstruct inotify_eventカーネルから送信されたものではありません。
struct inotify_event
実際には、イベントを取得したときに、責任のあるプロセスがまだ実行されているという保証はありません。