Question for Permissions Check by_ssh #699
Closed
CristianGLepore
started this conversation in
General
Replies: 2 comments
|
Sure. To achieve the desired behavior, you can use a negative lookahead in your Python regular expression. The negative lookahead allows you to specify a pattern that must not be present immediately after the match. For example, you might want to match the directory "opt" in your output only if the entire line does not begin with "drwxrwxrwx". A working cmdline call would be |
0 replies
|
Another more consistent way using |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I am trying to generate a check to validate the permissions of a directory in Ubuntu. For this, I am using the by_ssh plugin. What I need to validate is that a directory has 777 permissions, for this I am executing the command
ls -l /Reviewing the documentation, I could see that there are parameters to indicate a notification when a regex is found within the response. Is there a way to give a notification when the answer is NOT rwxrwxrwx ?
All reactions