ACLを使用してユーザー間でサーバーにアクセス許可を設定しようとしています。、次のように表示されます:

root@svn:/srv/resources/somedir# getfacl dir10 # file: dir10 # owner: root # group: mygroup # flags: -s- 

これらのフラグはどういう意味ですか?どうすれば変更できますか?

回答

from man getfacl

 The output format of getfacl is as follows: 1: # file: somedir/ 2: # owner: lisa 3: # group: staff 4: # flags: -s- [...] Line 4 indicates the setuid (s), setgid (s), and sticky (t) bits: either the letter representing the bit, or else a dash (-). This line is included if any of those bits is set and left out otherwise, so it will not be shown for most files. (See CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD 17 below.) 

これらの値を設定します。man setfaclを参照してください:

 --restore=file Restore a permission backup created by `getfacl -R" or similar. All permissions of a complete directory subtree are restored using this mechanism. If the input contains owner comments or group comments, setfacl attempts to restore the owner and owning group. If the input contains flags comments (which define the setuid, setgid, and sticky bits), setfacl sets those three bits accordingly; otherwise, it clears them. This option cannot be mixed with other options except `--test". 

回答

@umläuteフラグの意味については完全に正しいです。ただし、-s-を削除するには、UNIX権限から削除する必要があります。

つまり

chmod g-s ./dir10 

--restore=fileは、権限を以前のレベルに戻すだけです( setgidを削除する場合としない場合があります。)そして、ディレクトリでは機能せず、ファイルのみで機能すると思います。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です