Question for Permissions Check by_ssh #699
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 |
Beta Was this translation helpful? Give feedback.
-
Another more consistent way using |
Beta Was this translation helpful? Give feedback.
-
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 ?
Beta Was this translation helpful? Give feedback.
All reactions