Boost logo

Boost Users :

From: Gavin Lambert (boost_at_[hidden])
Date: 2020-05-06 22:53:38


On 7/05/2020 03:45, Dominique Devienne wrote:
> Hi. I'm not having any luck with finding out whether a folder is
> writable or not,
> on Windows. Is Boost.Filesystem (1.64) supposed to work on Windows for
> permissions?
> Especially in "special" folders like those in "C:\Program Files"?
>
> C:\Program Files\Vendor\App>echo foo > bar
> Access is denied.
>
> But Boost.Filesystem reports permissions as rw-rw-rw-, when printing
> them using the BFS-equivalent to the example available on CppReference
> https://en.cppreference.com/w/cpp/filesystem/perms
>
> Despite obviously the folder not being writable, w/o being an administrator.

IIRC, it only looks at the basic file attributes (in this case, the
"read only" checkbox), and doesn't check the ACL at all.

I think it ignores ACLs on Unixen similarly (albeit they're less
commonly used over there).


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net