Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4622906
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:54:35+00:00 2026-05-22T02:54:35+00:00

In CreateFile() has DesiredAccess Like GENERIC_READ, GENERIC_WRITE, FILE_READ_ATTRIBUTES, etc. My question is what is

  • 0

In CreateFile() has DesiredAccess Like GENERIC_READ, GENERIC_WRITE, FILE_READ_ATTRIBUTES, etc.

My question is what is the minimum/exact permissions needed to solely delete a file in the system?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:54:36+00:00Added an answer on May 22, 2026 at 2:54 am

    If you just want to delete a file, use the DeleteFile function.

    It’s documentation details what permissions you need, and a few things you should know, like:

    If you request delete permission at the time you create a file, you can delete or rename the file with that handle, but not with any other handle.

    There is good information in that documentation page, including a link to File Security and Access Rights.

    Look at the ACCESS_MASK page linked from the OpenFile documentation page for the actual delete access right flag – it’s simply called DELETE.

    But a word of warning: this type of check is always racy. The file permissions can change between your access right check and a subsequent delete. (Time of check/time of use.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in one process, i called createfile with GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_ALWAYS,
This is my procedure: bool Open(std::string filename) { ... HANDLE hFile = CreateFile(filename.c_str(), GENERIC_READ,
Win32's CreateFile has FILE_FLAG_DELETE_ON_CLOSE , but I'm on Linux. I want to open a
I have a table [Product] with a column [CreateTime] datetime null, and is has
When CreateFile Function is called without the flag FILE_FLAG_NO_BUFFERING, what is the size of
I am calling CreateFile() to create a file in the Program Data directory. I'm
I need to replace all WinAPI calls of the CreateFile, ReadFile, SetFilePointer, CloseHandle with
I need to create file sharing and chatting system like Microsoft Groove under .NET
The relevant Microsoft doc is: Blocking Direct Write Operations to Volumes and Disks CreateFile,
I'm sorry if this is similar to an earlier question but this is something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.