About this question
The .htaccess in our application has 777 permissions because a sister application needs to write to it. How is htaccess with 777 permissions bad for security? What will be considered a more secure alternative?
The .htaccess in our application has 777 permissions because a sister application needs to write to it. How is htaccess with 777 permissions bad for security? What will be considered a more secure alternative?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask Cyber Security Expert
Answered on Feb 3, 2022
Yes, XX7 is very bad for security, it gives read, write and execute access to all users and should be avoided unless absolutely necessary. A malicious user could use the .htaccess file to get a malicious or sensitive file to become visible to the web interface. Then, using the web interface user (who may have elevated privileges) the malicious actor could perform actions under that context. If you can get the sister application and the .htaccess file to have the same owner/runner then 700 should work, otherwise try to get them into the same group and have 770.Obviously the more users with write access to a file the less secure it is.If some level of access ( > 0) is required for .htaccess permissions, consider:
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Cyber Security guides from industry experts
Common Cyber Security interview questions, answered
Guides, tips and career advice on Cyber Security from JanBask experts.
Cyber Security How to Prepare for SOC Analyst Certification: A Practical Study Guide
Learn how to prepare for SOC analyst certification with a practical study plan. Compare CySA+, SC-200 and BTL1, build hands-on…
Cyber Security How to Prepare for Penetration Testing Certification: A Practical Study Guide
Learn how to prepare for penetration testing certification: compare PenTest+, OSCP, eJPT and CEH, build a study plan, and…
Cyber Security Is Penetration Testing a Good Career in 2026? Pay, Demand, Pros & Cons
Is pen testing a good career? See honest data on demand, pay, entry barriers, AI’s impact, and whether penetration testing is…
Cyber Security GRC Analyst Salary: How Much Can You Earn in 2026?
GRC analyst salary guide for 2026: see average pay, salary range by experience, location, and certifications, plus how to grow…