For directory (folder), only read
is not enough. You need to set execute
also. Because for directory, execute
means you can enter the directory.
Files need read
permission & directory needs read
& execute
permission.
So the directory permission should be: 0555
. However, image files inside that directory should be just read
, in numeric form: 0444
.
For example, in your case, /legacy-images/
directory will have 0555
permission & /legacy-images/image1.png
image file will have 0444
permission.
Shell Command
If you can access shell and know how to, you may use the following shell commands (replace <WP_DIRECTORY>
with appropriate WordPress installation directory):
cd <WP_DIRECTORY>
chmod 555 legacy-images/
cd legacy-images/
find ./ -type f -exec chmod 444 {} \;
Related Posts:
- How do I prevent a folder from reappearing in my home directory?
- How do I change/modify the_post_thumbnail(); html output?
- What’s the best way to use the Featured Image for responsive web design?
- How to add a class to the attachment images
- How do I hook into WordPress to save an uploaded photo as an alternate size to an existing photo?
- How to check if image is already stored in a site’s post database? (network)
- Adding a custom image upload size and making it selected by default?
- Hide custom image sizes from media library
- Change the filename format of saved featured images
- How to draw media details for Isotope gallery using Photoswipe
- How to register images uploaded via FTP in media library?
- Namespacing WordPress project according to FIG standards
- Create Image Uploader for Widget
- Using file_exists to check file in Uploads
- Permanently remove first image from posts
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Rename image uploads with width in filename
- Admin Media grid view images won’t load
- WordPress remove EXIF Data from specific Thumb
- Debugging upload problem: What part of WP does actual image-resizing?
- How to resize image on client-side before upload?
- Adding Featured Image to Post programatically
- Add custom image sizes to media uploader
- Conditional Statement – check if post has an attachment image
- Does wordpress allow me to add a php file to the root directory to execute custom scripts?
- How to upload imagick resource to media in wordpress
- How to get the url of the entry in which an image belongs
- New user – Create a folder
- How to add a PHP scripts into WordPress
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Featured images duplicating and replacing next image
- Get list of posts from attachment
- I can’t load my images from a js file using wp_localize_script
- How to create an unordered list of images separate from the content
- Autoloading Classes in Plugins
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- Get the image title and alt from custom query
- How to include different html tags in the header for different pages?
- How to always display full size image
- what’s the syntax for if the image exists get the image?
- Strange special character/Latin characters
- How do I get the featured post to share on Social Media and show on Individual Post pages?
- Resource 404 error on multisite subdirectory install
- Retrieving specific images from Media Library
- How do I routinely extract the thumbnail of the most recent post?
- How to change this internal image link parameter using PHP?
- add class to background image
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Save the outputted image into the Media Library, with a different filename and extension
- Pass php to database in JQuery: With AJAX?
- How to resize an image server-side before upload?
- magic-quotes – breaks admin totally
- Permission functions within wordpress
- Creating image gallery in wordpress
- Retrieve first image url from custom post with pagination
- Image limit from 1 to 5
- Name Input from widget displays Sidebar name instead of saved data
- Gallery requires a featured image but does not show it in posts/pages
- Snapshot Theme from WooThemes — empty ‘alt’ attribute
- WP white screen of death after duping a site that works fine on same server
- Changing 2011 theme header image based on user dropdown
- Setting post thumbnail sizes in template file and functions.php
- images in wordpress themes
- Determine if only one image attached to a post/page
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- Crop images in both sides on wordpress [duplicate]
- upload images on front by user using form
- Correct Syntax for uploading files to custom directory in WordPress
- How do I return an image from a script
- PHP-Code inside Href-Tag
- Can I have a php site on subdirectory of WordPress?
- HTML in PHP problem [closed]
- Adding slides to an existing carousel manually
- Where to store the images of a custom WordPress theme?
- how to put shortcode to the top of the page – theme 2014
- Display Post Titles on top of the_post_thumbnail()
- add if statement to the featured image
- An automatic way to crop images of different sizes
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- How to automatically convert images to WebP on WordPress?
- Remove default Image Sizes
- kali php problem [closed]
- Understanding responsive imagery
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- bloginfo url in javascript
- Use URL query string in img src attribute
- Add/alter image attribute before render
- How Create Automatically Image jpg.webp from image .jpg without delete or change original images upload
- Using Featured Image as Hero Background in Word Press
- How can add alt tag in following code. Image are showing dynamic in wordpress
- Adding caption to all images inside an article
- Get a list of folders inside uploads directory
- How to add a shortcode for an image in the following function
- HELP PLEASE PHP slider css
- Restricting Image Upload Sizes using ‘wp_handle_upload_prefilter’ – Stuck media progress bar when Featured Image?
- How to link the path of a folder situated in public.html for a random video player?
- Image alt tag is showing post title instead of Alt Text
- Responsive images, per image type?