grep -iR "Deny From All" /* 2> /dev/null > output.txt
grep -iR "Deny From All" /* 2> /dev/null >> output.txt
0 stdin Standard input
1 stdout Standard output
2 stderr Standard error
grep -R '(php|php5|suspected|py|phtml)' /var/ww/html
[andrew@darkstar:~]$ sudo grep -R -v "Order allow,deny\n Deny from all" /etc/httpd/conf/vhosts (07-10 10:01)
/etc/httpd/conf/vhosts/andrinaPerfectBeauty.com:<VirtualHost 127.0.0.2:80>
/etc/httpd/conf/vhosts/andrinaPerfectBeauty.com: ServerAdmin [email protected]
sudo grep -R -v -l "Order allow,deny\n Deny from all" /var/www/html
//last string i.e web root
andrew@darkstar:~]$ sudo grep -R -v -l "Order allow,deny\n Deny from all" /etc/httpd/conf/vhosts
[sudo] password for andrew:
/etc/httpd/conf/vhosts/andrinaPerfectBeauty.com
[andrew@darkstar:~]$ (07-10 10:11)
Execute following command line;You would need to use a regex with grep in order to find files with exactly those lines, I'm still learning those myself so can't be much of a help with that. However you could just do a search on the first line since it is likely that if such an option is configured somewhere that it is configured for a deny. So try this.
Changing /var/www/html to the location where your websites are.Code:grep -R '(php|php5|suspected|py|phtml)' /var/ww/html
Thanks for your advice.testing from shell at ~ to look at " /etc/httpd/conf/vhosts" (because i know thats where i have that text math ) can match pattern using :
Code:[andrew@darkstar:~]$ sudo grep -R -v "Order allow,deny\n Deny from all" /etc/httpd/conf/vhosts (07-10 10:01) /etc/httpd/conf/vhosts/andrinaPerfectBeauty.com:<VirtualHost 127.0.0.2:80> /etc/httpd/conf/vhosts/andrinaPerfectBeauty.com: ServerAdmin [email protected]
i didn't worry about files; there is a flag to show files that grep finds match .
so you try maybe something along lines :
Code:sudo grep -R -v -l "Order allow,deny\n Deny from all" /var/www/html //last string i.e web root
-l should give you file name
with -l flag i got :
andrinaPerfectBeauty.com is actually a FILE in /etc/httpd/conf/vhosts containing elements specific to that domainCode:andrew@darkstar:~]$ sudo grep -R -v -l "Order allow,deny\n Deny from all" /etc/httpd/conf/vhosts [sudo] password for andrew: /etc/httpd/conf/vhosts/andrinaPerfectBeauty.com [andrew@darkstar:~]$ (07-10 10:11)
thats my daughters site by the way before someone thinks i'm a cross dresser or something