检查用户是否有权执行文件 [英] Check if user has permission to execute file
本文介绍了检查用户是否有权执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
标题中:如何检查用户(脚本参数)是否具有使用bash中的find
执行文件的权限?
as in title: how to check if user(script parameter) have permission to execute file using find
in bash?
我认为与-perm
有关,但是我现在完全不知道如何开始.
I think is something with -perm
but i tottaly dont now how to start with that.
推荐答案
在以下示例中使用find,给用户指定脚本参数$ 1:
Use find as in the following example, given user as script parameter $1:
$ find /path/to/dir/ -user $1 -type f -perm -u+x
这篇关于检查用户是否有权执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文