How can I set permissions with different User names from that of the Command Prompt to run a file?

Anonymous
2024-02-08T05:14:14+00:00

When I go to advanced settings on Properties for the .pem file I got from AWS, I went ahead and gave myself permission to have all access but still get the error: Permission Denied. My feeling is that in the command prompt, I have C:\Users\light\Desktop but in properties when I give "light" permissions, I get "@gmail.com" and I think that is what is causing it to still deny me from running the file in the Command Prompt. How can I change it so these sync up (I think changing the email to just "light" would probably be faster but I do not know how to do this. Thank you!

Windows for business Windows Server Networking Software-defined networking

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-02-09T01:21:46+00:00

    Hello,

    To set permissions for a file in Windows, you can use the "icacls" command in the Command Prompt. Here's an example of how to grant full control to a user named "light" for a file named "example.pem" located on the desktop:

    1. Open Command Prompt as an administrator.
    2. Type the following command and press Enter: icacls C:\Users\light\Desktop\example.pem /grant light:(F)
    3. This will grant the user "light" full control over the file "example.pem".

    If you want to change the email associated with your user account, you can do so by going to the Windows settings and changing your account name. Here's how:

    1. Click on the Start menu and select "Settings".
    2. Click on "Accounts".
    3. Click on "Your info".
    4. Click on "Manage my Microsoft account".
    5. Sign in with your Microsoft account.
    6. Click on "Edit name".
    7. Change your name to "light" (or whatever you prefer).
    8. Click on "Save".

    Once you've changed your account name, you can use the new name in the "icacls" command to grant permissions to the correct user.

    Regards,

    Karlie

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2025-01-26T22:28:25+00:00

    did you end up solving this, can you explain to me how you went about it

    0 comments No comments