[wp-trac] [WordPress Trac] #51340: Stop chmodding files and folders

WordPress Trac noreply at wordpress.org
Mon Mar 27 19:14:54 UTC 2023


#51340: Stop chmodding files and folders
----------------------------+------------------------------
 Reporter:  malthert        |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Filesystem API  |     Version:  5.3
 Severity:  major           |  Resolution:
 Keywords:  dev-feedback    |     Focuses:
----------------------------+------------------------------

Comment (by azaozz):

 Thinking some more about this: would it make sense to check the
 permissions before attempting to set them? Would make setting permissions
 a bit slower, but would avoid unnecessary changes. May also help in cases
 where `chmod()` has been disabled.

 Also perhaps instead of checking the exact permissions `is_readable()` or
 `is_writable()` may make more sense in some cases? This can also be in a
 plugin assuming there is `wp_chmod()` and a short-circuit filter.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51340#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list