{"id":22,"date":"2006-07-28T12:15:06","date_gmt":"2006-07-28T12:15:06","guid":{"rendered":"http:\/\/ramblingsofasysadmin.com\/blog\/?p=22"},"modified":"2006-07-28T12:15:06","modified_gmt":"2006-07-28T12:15:06","slug":"finding-files-with-specific-permissions","status":"publish","type":"post","link":"http:\/\/ramblingsofasysadmin.com\/?p=22","title":{"rendered":"finding files with specific permissions."},"content":{"rendered":"<p>in may, we did a plesk migration from an older server to a newer one.  it was relatively smooth, but for some reason, a lot of image permissions were not kept intact (instead being read+write only by the owner, but not the user or group).<br \/>\ni am beginning to learn how useful the <font face=\"courier\">find<\/font> command is.  this code snippet below enabled me to find all of the jpg images on my server that were chmodded 600 &#8230; and made them appropriately readable.<br \/>\n<font face=\"courier\"># find \/home\/httpd\/vhosts -name &#8216;*.jpg&#8217; -perm 600<\/font><br \/>\nbut wait, you can execute commands on these results too!<br \/>\n<font face=\"courier\"># find \/hme\/httpd\/vhosts\/ -name &#8216;*.jpg&#8217; -perm 600 -exec chmod 644 {} \\;<\/font><br \/>\ngood stuff!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>in may, we did a plesk migration from an older server to a newer one. it was relatively smooth, but for some reason, a lot of image permissions were not kept intact (instead being read+write only by the owner, but not the user or group). i am beginning to learn how useful the find command is. this code snippet below enabled me to find all of the jpg images on my server that were chmodded <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"http:\/\/ramblingsofasysadmin.com\/?p=22\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22"}],"version-history":[{"count":0,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}