0
0
Wordpressframework~20 mins

File permission hardening in Wordpress - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
WordPress File Permission Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding WordPress file permission basics
Which file permission setting is generally recommended for WordPress files to ensure security while allowing the web server to read them?
A644
B600
C777
D755
Attempts:
2 left
💡 Hint
Think about permissions that allow reading but restrict writing by others.
component_behavior
intermediate
2:00remaining
Effect of incorrect directory permissions in WordPress
If WordPress directories are set to permission 644 instead of the recommended 755, what is the most likely outcome?
AWordPress will fail to upload media files or install plugins due to lack of execute permission on directories.
BWordPress will work normally without any issues.
CWordPress files will become publicly writable, causing security risks.
DWordPress will automatically correct the permissions to 755.
Attempts:
2 left
💡 Hint
Directories need execute permission to allow access inside them.
📝 Syntax
advanced
2:00remaining
Correct .htaccess rule to prevent PHP execution in uploads
Which of the following .htaccess snippets correctly prevents execution of PHP files inside the wp-content/uploads directory?
A
<Files *.php>
  Require all denied
</Files>
B
<Files *.php>
  deny from all
</Files>
C
<FilesMatch "\.php$">
  deny from all
</FilesMatch>
D
<FilesMatch "\.php$">
  Require all denied
</FilesMatch>
Attempts:
2 left
💡 Hint
Modern Apache versions use 'Require all denied' for access control.
🔧 Debug
advanced
2:00remaining
Diagnosing permission error during plugin update
A WordPress site shows a 'Could not create directory' error when updating plugins. The wp-content/plugins directory has permissions 755 and is owned by root. What is the most likely cause?
AThe plugins directory is missing execute permission.
BThe directory permissions 755 are too restrictive; it should be 777.
CThe directory ownership by root prevents the web server user from writing to it.
DThe WordPress configuration file is corrupted.
Attempts:
2 left
💡 Hint
Check who owns the directory and which user runs the web server.
state_output
expert
2:00remaining
Result of applying restrictive permissions on wp-config.php
If the wp-config.php file is set to permission 400 (read-only by owner) and owned by the web server user, what will be the effect on WordPress operation?
AWordPress will fail to load because it cannot write to wp-config.php.
BWordPress will function normally, as it only needs to read wp-config.php.
CWordPress will throw a permission denied error when updating plugins.
DWordPress will automatically change the permission to 644.
Attempts:
2 left
💡 Hint
Consider if WordPress needs to write to wp-config.php during normal operation.