> Hello,
> 
> I was enthusiastic to write down a tool that permitted everyone
> to check and print the default file permissions of a given path
> but when I knocked my eyes against mtree behavior I remained
> frightened. 
> 
> Given for example:
> 
> mtree -c -f /etc/mtree/4.4BSD.dist -K uid,guid,mode -p /usr/games -e

what is your intention when using these flags? What do you want to do?


> I was expecting that:
> -p let me pass the path to check to mtree like /usr/games

Yes, you are right: p uses path instead of the current directory.


> -K uid,guid,mode let me suggest the output for each file entry
>   specified together with -c command option 

on 7.4: 
$ man mtree | grep -A 57 "supported keywords"
it also gives hint about the specified 'guid' keyword


> But indeed mtree behavior is really different. 

Yes, you are right.


> Please point me in the right direction with mtre

'man mtree' is a good start.
or check security(8). On 7.4 you can do:
$ grep -B 12 -A 27 "sub check_mtree" /usr/libexec/security

Reply via email to