Directory protection does not update .htaccess
Hi,
When accessing the Directory Privacy option in cPanel, passwd is created but the .htaccess entry is not created, so when accessing the address the password is not required.
If manually entered in .htaccess password is required when accessing address
This happens on two different servers:
root@vpstest [/home/zabbixhgmxco]# cd .htpasswds
root@vpstest [/home/zabbixhgmxco/.htpasswds]# ll
total 12
drwxr-x--- 3 zabbixhgmxco nobody 4096 Jul 25 16:47 ./
drwx--x--x 30 zabbixhgmxco zabbixhgmxco 4096 Oct 7 15:04 ../
drwxr-x--- 3 zabbixhgmxco nobody 4096 Dec 3 13:03 public_html/
root@vpstest [/home/zabbixhgmxco/.htpasswds]# cd public_html/
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html]# ll
total 12
drwxr-x--- 3 zabbixhgmxco nobody 4096 Dec 3 13:03 ./
drwxr-x--- 3 zabbixhgmxco nobody 4096 Jul 25 16:47 ../
drwxr-x--- 2 zabbixhgmxco nobody 4096 Dec 3 13:21 TESTEHG/
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html]# cd TESTEHG/
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html/TESTEHG]# ll
total 12
drwxr-x--- 2 zabbixhgmxco nobody 4096 Dec 3 13:21 ./
drwxr-x--- 3 zabbixhgmxco nobody 4096 Dec 3 13:03 ../
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 93 Dec 3 13:21 passwd
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html/TESTEHG]#
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html/TESTEHG]#
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html/TESTEHG]# cat passwd
testehg:$apr1$VoCDgz_y$eZkxNgwMT9FkPAjdQ3O1m/
testehg2:$apr1$rtSBCJuy$8GeSiYNLZnpoKjE6aKhNm1
root@vpstest [/home/zabbixhgmxco/.htpasswds/public_html/TESTEHG]#
root@vpstest [/home/zabbixhgmxco]# for file in $(find -name .htaccess); do ls -lt $file ; done
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 299 Aug 19 22:26 ./subdomain.zabbix.hgmxco.net/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 112 Jul 15 09:42 ./.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 45 Oct 27 2016 ./public_html/lpremoli/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 362 Aug 19 22:26 ./public_html/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 337 Sep 25 2018 ./public_html/app-old/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 298 Aug 19 22:26 ./public_html/zabbixreport.com.br/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 299 Aug 19 22:26 ./public_html/app/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 299 Aug 19 22:26 ./public_html/luana.com/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 42 Sep 25 2018 ./public_html/loppremoli.com/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 255 Mar 7 2018 ./public_html/wordpress/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 150 Nov 30 2018 ./public_html/wordpress/wp-content/ai1wm-backups/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 629 Jun 18 2018 ./public_html/wordpress/wp-content/plugins/akismet/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 350 Jul 25 16:50 ./zabbixreport.com.br/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 13 Jul 7 2017 ./.composer/.htaccess
-rw-r--r-- 1 zabbixhgmxco zabbixhgmxco 13 Jul 7 2017 ./.composer/cache/.htaccess
If manually entered in .htaccess password is required when accessing address
AuthType Basic
AuthName "zabbixhgmxco"
AuthUserFile "/home/zabbixhgmxco/.htpasswds/public_html/TESTEHG/passwd"
require valid-user
This happens on two different servers:
root@vpstest [~]# grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype; uname -r
/etc/redhat-release:CentOS release 6.10 (Final)
/usr/local/cpanel/version:11.82.0.19
/var/cpanel/envtype:virtuozzo
2.6.32-042stab133.2
root@vpstest [~]#
[root@br678 ~]# grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype; uname -r
/etc/redhat-release:CentOS release 6.10 (Final)
/usr/local/cpanel/version:11.78.0.44
/var/cpanel/envtype:kvm
4.14.121-197.ELK.el6.x86_64
[root@br678 ~]#
Please sign in to leave a comment.
Comments
0 comments