It would be better to use file permissions. However, this doesn’t work with all hosters.
Go to your FTP explorer and change the file permissions of an image to 400 (only read for my own user, all others have no right at all). Can you still access this file via the web or do you see a 403 Forbidden error? If it works you can do this for all files and add write permissions where you need them. Then try out if the upload still works.
If the other sites have different file users, then this will prevent them from accessing your files. This normally requires CGI/FCGI or similar setups.
Related Posts:
- SSL Error: unable to get local issuer certificate
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- What is the difference between a cer, pvk, and pfx file?
- Where does Internet Explorer store saved passwords?
- Infected Files – what to do [closed]
- Why does WordPress need my private ssh key to update?
- Why escape if the_content isnt?
- Why does WordPress have more than one salt?
- What is the ideal setup to address security concerns?
- is_email() VS sanitize_email()
- Can someone explain the use cases of esc_html?
- Close a wordpress blog – keep site as it is but prevent hacks
- Moving wp-config.php: Can this be done after site launch?
- Prevent setup-config.php page from appearing when host blocks database
- How to get WordPress to save upload file beyond web root [closed]
- WordPress and Security
- Is security a problem in WordPress?
- Moving wordpress out of the public directory
- Is /wp-login.php?redirect_to[] exploitable?
- Logout via Subdomain, non-wordpress page on a different server?
- brute force attack even though it is limited by IP
- What should I do about hacked server?
- How can I tell who changed the password?
- WordPress website Security [closed]
- How do I authenticate WP users from a chrome extension?
- Can’t reset WordPress password
- Website is being flooded [closed]
- Is the “lost password” feature truly a vulnerability?
- Is it possible to reduce the minimum character length for passwords?
- Handling email piping attachments and detecting unsupported file types
- Why was my blog post inserted lot’s of ad links by others?
- Should I Worry About SQL Injection When Using wp_insert_post?
- Auth cookie value security risk?
- Is there a way for a user to have an alias?
- Security – Shortcode injection attack
- Registration Plugin – Recaptcha integration
- Security threat with `home_url`?
- How to combat flooding admin-ajax.php?
- When is wp_set_password() called or how to capture a password
- Moving away from MD5: Where to declare the custom global $wp_hasher?
- Would it be dangerous to send all the wp_options to javascript file?
- Frequently getting attacks on admin-ajax.php, wp-cron.php, xmlrpc.php and wp-login.php
- Should I disable directory listing for wp-includes?
- How to get WordPress to send Password Reset Link Email instead of New Password?
- Safety side of storing emoji into database
- Verifying that I have fully removed a WordPress hack?
- Large Session Tokens
- How can I safely hide the fact that my website runs on WordPress? [closed]
- How to change permissions of WordPress and/or apache on macOS securely?
- How can I display nickname instead username in links
- My WordPress Websites are always under attack
- Is there value in using a wp_nonce for POST requests?
- Using an Encryption class in a WordPress Plugin
- How to hide easy access to my website temporarily?
- Can I Remove xmlrpc.php completely?
- Config file with no Keys..?
- How much should I worry about these messages?
- Security concerns with external links
- Uploading .webm format on WordPress results in security guidline breach and fail
- Any any insecure http:// URLs left in wordpress?
- White screen of death on admin pages after moving wp-config up two levels for security
- .htaccess password protection bypassed
- Session Cookie security questions
- Storing FTP details in wp-config.php
- Can a WordPress administrator see other users’ passwords?
- Why my plugins are updating automatically?
- Spam injected in w3 total cache page cache [closed]
- Privilege escalation bugs in 2.9?
- Content-Security-Policy blocks WordPress check boxes from being activated
- How to distinguish between a hack and an encoding error?
- Prevent editor from adding script or form
- How to change location of wp-config.php to folder or 2 folders up?
- Finding where a snippet of code is coming from
- wordpress admin security
- Remove hacked code – out of ideas! [closed]
- Why do people use “admin” username by default? [closed]
- WordPress Database Re-installed (Hacked)
- WordPress Security tools
- Robots.txt file not updating
- Security: Critical backend outside of wordpress
- Advice On How to Backup WordPress
- How can I stop other plugins from using my class’ sensitive methods?
- What are WordPress Current Security Issues in 2017?
- wp-config.php moved above root results in no plugin updates
- Password-protect feed and make it usable in major aggregators
- Should I change the default file and folder permissions?
- WordPress exploited theme is causing high io load on server
- How to rewrite rules for WP-security in Nginx?
- How to set custom validation for WordPress Passwords?
- Is it a bad idea to CHMOD 777 all the files on your site?
- How to stop repeated hack on header.php of custom theme? [closed]
- Default installation permissions for wp-config.php
- Correct setup to block file modifications from hackers
- Move data from wp-config to another file
- How do you search for backdoors from the previous IT person?
- Heartbleed: What is it and what are options to mitigate it?
- OpenVPN vs. IPsec – Pros and cons, what to use?
- How to test if my server is vulnerable to the ShellShock bug?
- Is wp-cron.php vulnerable to external attacks and how to protect it?
- How to address security vulnerabilities: LUCKY13, BEAST, and BREACH