In Virtualmin I am trying to create a protected directory. However, I keep getting the following error:
Failed to protect new directory : Failed to open /home/main/domains/test.jarebmorgan.com/public_html/cp/.htaccess for writing : Permission denied at …/web-lib-funcs.pl line 1376.
If anyone knows how to fix this I would appreciate it.
the ls -ld command displays
drwxrwxr-x 3 www-data www-data 4096 Oct 13 15:12 /home/main/domains/test.jarebmorgan.com/public_html/cp
I get the error after clicking on services -> protected directories -> add protection for a new directory -> Select Sub-Directory -input the “cp” without quotes in field -> type message in Authentication realm -> Click create -> Then get error
Ah, it looks like the /home/main/domains/test.jarebmorgan.com/public_html/cp directory is owned by the www-data user, rather than the Virtual Server owner.
You would want to change the owner of that directory to be the Virtual Server owner… you can do that with this command: