LsVarWwwPerms - command /bin/ls -la /dev/null /var/www

class insights.parsers.ls_var_www_perms.LsVarWwwPerms(context, extra_bad_lines=None)[source]

Bases: insights.core.CommandParser, insights.core.FileListing

Class for parsing /bin/ls -la /dev/null /var/www command.

file_permissions

list of FilePermissions objects for every file from the output

Type

list

Sample output of this command is:

crw-rw-rw-. 1 root root 1, 3 Dec 18 09:18 /dev/null

/var/www:
total 16
drwxr-xr-x.  4 root root  33 Dec 15 08:12 .
drwxr-xr-x. 20 root root 278 Dec 15 08:12 ..
drwxr-xr-x.  2 root root   6 Oct  3 09:37 cgi-bin
drwxr-xr-x.  2 root root   6 Oct  3 09:37 html

Examples

>>> type(ls_var_www_perms)
<class 'insights.parsers.ls_var_www_perms.LsVarWwwPerms'>
>>> ls_var_www_perms.file_permissions[2]
FilePermissions(cgi-bin)
>>> ls_var_www_perms.file_permissions[2].line
'drwxr-xr-x.  2 root root   6 Oct  3 09:37 cgi-bin'
parse_content(content)[source]

This method must be implemented by classes based on this class.