人気コンテンツ今日: |
find + chmodでパーミッションの一括変更Submitted by sasaki on 月曜, 2006-03-20 14:32.
Webサーバ上のファイルのパーミッション(アクセス権)を一括で変更したい。ということがよくある。
■一括で、public_html以下のファイルを644へ変更する$ find public_html -type f -print | xargs chmod 644 または、 $ find public_html -type f -exec chmod 644 {} \;
■一括で、public_html以下のディレクトリを755へ変更する$ find public_html -type d -print | xargs chmod 755 または、 $ find public_html -type d -exec chmod 755 {} \;
■SGID(グループIDのs)をとる$ ls -l ■SGID(グループIDのs)を一括でとるdrwxr-sr-xとなっているディレクトリを確認する。 find . -type d -perm -02000 一括でsを外す。 find . -type d -perm -02000 -print | xargs -i chmod g-s {}
|
Webマスターな生活amazon広告英語お勧め教材! 英語の学校でも使っているのですが、1つのストーリーを3分で読めて、内容も面白く、もっと早く出会いたかった本です。 Apple好きで英語も勉強したいならこの一冊! ブログパーツ |