{"id":44994,"date":"2015-04-28T07:00:00","date_gmt":"2015-04-28T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2015\/04\/28\/access-to-a-files-attributes-is-controlled-by-two-things\/"},"modified":"2015-04-28T07:00:00","modified_gmt":"2015-04-28T07:00:00","slug":"access-to-a-files-attributes-is-controlled-by-two-things","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20150428-00\/?p=44994","title":{"rendered":"Access to a file&#039;s attributes is controlled by two things"},"content":{"rendered":"<p>We saw <a href=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2007\/07\/26\/4052149.aspx\"> some time ago<\/a> that permission to delete a file is granted either<\/p>\n<ul>\n<li>if you have <code>DELETE<\/code> access on the file, or <\/li>\n<li>if you have <code>FILE_DELETE_CHILD<\/code>     access on the containing directory. <\/li>\n<\/ul>\n<p> File attributes behave in an analogous way.\n Permission to read a file&#8217;s attributes is granted either<\/p>\n<ul>\n<li>if you have <code>FILE_READ_ATTRIBUTES<\/code> access on the file,     or <\/li>\n<li>if you have <code>FILE_LIST_DIRECTORY<\/code>     access on the containing directory. <\/li>\n<\/ul>\n<p> If you want the file&#8217;s attributes, you could always get it by reading the directory, because one of the pieces of information you get from <code>Find&shy;First&shy;File<\/code> is the file attributes. Therefore, having permission to read a directory implicitly gives you permission to read the attributes of any file in that directory.<\/p>\n<p> (Note, of course, that <i>write<\/i> permission on attributes is another story.) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>We saw some time ago that permission to delete a file is granted either if you have DELETE access on the file, or if you have FILE_DELETE_CHILD access on the containing directory. File attributes behave in an analogous way. Permission to read a file&#8217;s attributes is granted either if you have FILE_READ_ATTRIBUTES access on the [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25,104],"class_list":["post-44994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>We saw some time ago that permission to delete a file is granted either if you have DELETE access on the file, or if you have FILE_DELETE_CHILD access on the containing directory. File attributes behave in an analogous way. Permission to read a file&#8217;s attributes is granted either if you have FILE_READ_ATTRIBUTES access on the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/44994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=44994"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/44994\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=44994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=44994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=44994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}