Check if user has permission to execute file

浪尽此生 提交于 2019-12-13 07:04:42

问题


as in title: how to check if user(script parameter) have permission to execute file using find in bash?

I think is something with -perm but i tottaly dont now how to start with that.


回答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


来源:https://stackoverflow.com/questions/42973829/check-if-user-has-permission-to-execute-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!