为C ++中的所有用户添加读取权限 [英] Add read permission to a file for all users in C++
问题描述
我在Windows 10上使用Visual Studio 2008,其中
AppLocker 。
我使用ofstream创建一个新文件。
切换用户时,我看到创建的文件没有读取权限没有创建文件的用户。
我想在C ++中以编程方式为所有用户添加读取权限。
我没有使用C ++ 17。
谢谢,
Zvika。
< blockquote>
我在Windows 10上使用Visual Studio 2008,其中
AppLocker 。
我使用ofstream创建一个新文件。
切换用户时,我看到的文件是创建没有未创建文件的用户的读取权限。
我想在C ++中以编程方式为所有用户添加读取权限。
我没有使用C ++ 17.
谢谢,
Zvika。
请参阅
在C ++中修改对象的ACL
因此,您可以使用该示例向Everyone组授予GENERIC_READ权限。" - > b $ b
Hi,
I'm using Visual Studio 2008 on Windows 10 with AppLocker.
I create a new file using ofstream.
When switching a user, I see that the file that was created has no read permission by a user that didn't create the file.
I want to add read permission for all users programmatically in C++.
I'm not using C++17.
Thanks,
Zvika.
Hi,
I'm using Visual Studio 2008 on Windows 10 with AppLocker.
I create a new file using ofstream.
When switching a user, I see that the file that was created has no read permission by a user that didn't create the file.
I want to add read permission for all users programmatically in C++.
I'm not using C++17.
Thanks,
Zvika.
See the discussion and sample code at Modifying the ACLs of an Object in C++
So you would use the sample to grant GENERIC_READ permission to the Everyone group.
这篇关于为C ++中的所有用户添加读取权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!