AWS CLI permission denied? - bash

I recently downloaded AWS CLI for Windows. I was able to use it just fine the first day however it is now giving me a Permission Denied error on Git Bash whenever I try to do anything with aws.
$ aws
bash: /c/Program Files/Amazon/AWSCLIV2/aws: Permission denied
I've tried uninstalling, reinstalling, restarting my computer, and still nothing. I've even tried messing with the permissions on the folder but it still says I dont even have permission to do that.
Any help?

In my case, this was caused by an AV Agent, specifically Carbon Black, identifying the CLI executable as a threat. Obviously this is a false positive and an issue with Carbon Black.
To resolve the problem I disabled "Protection" temporarily, did what I needed to do, and then uninstalled the CLI until I can get a hold of the responsible party within our organization. I'm also planning to submit this to CB.
Here's how to disable protection:
Find the Carbon Black icon in the bottom right-hand corner of the taskbar.
Right-click the icon and then select Open.
In the CB Agent window, you should see a "Protection" toggle at the top right. Click Off
You should now be able to install the AWS CLI, or use it if you had already installed it.

Related

Windows: XAMPP install folder ini file permission error, Access denied upon configuration save

After installing XAMPP to Windows 10 (all default/recommended installation attributes), I now have an issue changing its configuration after opening it.
Error: Cannot create file "C:\xampp\xampp-control.ini".
Access is denied
Clicking Save to a change in Configuration of Control Panel:
This "Configuration of Control Panel" box opens after clicking the "Config" button at the top right of the running XAMPP app:
I've tried a suggestion to run the XAMPP app with Administrator (elevated) access… but that seems like a major security issue, considering I don't know exactly what XAMPP would or could do with my files that require that permission, whether intended by the people who run XAMPP or not.
I've tried re-installing to another folder, like to C:\Users\Me, or a sub-folder like Documents or a custom one, but I just got different permissions issues that I struggled to figure out.
If you know a solution that worked for you, that avoided running XAMPP with Admin privileges, please let me know. I've gone through a handful of seemingly-related questions here but they seem to be related to MySQL/PHP questions and not Windows file system permissions.
I found a solution after noticing that the file already existed from apparently a past workaround I tried with running XAMPP as Admin... based on the permissions of the file being different than its parent folder. I discovered this by right-clicking the xampp folder or the xampp-control.ini file then selecting Properties and clicking the Security tab, then clicking into each attached user account's permissions.
So, my C:\xampp folder has these permissions: for Admin, basically full access; for my user account, Read, Execute, and Write.
The xampp-control.ini file has only Admin permissions; my user account is not attached to it.
Adding my user account to the xampp-control.ini file's Security, and adding Write permission then allowed XAMPP's config panel to save my changes.
Note that I typed my username into the "Enter the object names to select" box, then clicked Check Names; this auto-populated my username reference (?), though I'm not sure how it would work if it finds multiple results. Then I could click OK to get back to the Permissions box to add "Modify" and "Write" for it. I'm completely OK giving my user account permission to modify and write to this file through the XAMPP app.
Now, that fixes that file for that scenario; now I'm wondering if there will be other permissions issues with other files, because I noticed some other files (that I checked randomly) don't all share the same permissions for my user account!
Maybe I should have instead modified the xampp folder's permissions recursively to give my user account Write and/or Modify access (I'm not sure of the difference, Windows permissions seem far more complicated to understand and use than Linux's and Mac's do).
I think the file permissions were all set by XAMPP during install; I don't know yet that expanding permissions on certain files will not create new problems...
I found a solution after noticing that error, here is my solution
go to xampp installation folder on the c drive
Xampp Destination
then find xammp control panel.exe
Xampp Control Panel
then right click and go to properties(or press ALT+ENTER)
Click Properties
then go to compatibility and enable Run this program as an administrator
Compatibility tab
Your Problem is now fixed

Catalina Operation not permitted in XQuartz/Xterm

After upgrading to Catalina from High Sierra, I can not longer do simple things in my home direction (e.g., ls, etc.) under XQuartz, getting an error: Operation not permitted.
I recognize that this is due to the new access controls introduced in the previous version. There are many articles available online describing how to fix this for Terminal, by adding Full Disk access under the Security section of System Preferences. However, although it seems like an obvious variation, I don't see anything about making this work for XQuartz. And in fact, giving XQuartz and Xterm full disk access doesn't seem to solve the problem.
Has anyone understood what is going on here?
The solution, as pointed out by #dmr195 in the comments, is to add /bin/bash (or whatever shell) to the Full Disk Access list under the Security area of System Preferences.
The selector window that opens when you click the + button in that window does not allow you to navigate to /bin. However, by going there in a regular Finder window, you can drag and drop bash into the Full Disk Access list.
I was unable to get Finder to see /bin in order to drag it to the Full Disk Access (FDA) list. Solution was to create dynamic link to /bin directory from my Desktop, which finder could see.
Also helpful was using Mac's Hypterm to launch an xterm with full permissions, for example to create above link. Launch Hypterm, then update the locate database (the command is: updatedb). This will prompt you to give FDA to Hyperterm for every directory that /bin/bash also cannot see. After that, run xterm and voila, FDA.
Adding full disk access for bash will not work.
The solution is to open the Terminal app and type xterm in Terminal to open up the XQuartz, then you will have full disk access with XQuartz.

Preventing Chrome Extension Uninstallation?

My company has Chrome with our custom extension running on windows machines.
Our goal is to launch chrome locally on our machines with our extension running at all times. Our users are constantly looking to uninstall our extension.
Our current approach is to utilize the ExtensionInstallForceList registry key. This sort of works:
Right now, one can still click into C:\WM_0.0 and delete the folder. Once the folder is deleted, this extension is gone.
So we tried the following:
Create a windows account "Client"
Assign "Client" to "Client Group"
Change the permission C:\WM_0.0 to Deny Write
Log out and login to the machine again as Client.
Once I login to my windows machine as Client, I can no longer load my extension:
I tried to change the folder's permission to Full Control for both Users and Client Group but I am still seeing this error in Chrome.
1. How can I load this extension successfully given my current set of circumstances?
2. Is there a better way to do this?

How do I hide the cmd windows when rotating logs?

I added this command to httpd_uwamp.conf :
#LOG ROTATION
TransferLog "|C:/UwAmp/bin/apache/bin/rotatelogs.exe C:/UwAmp/bin/apache/logs/backup/access-%Y_%m_%d.log 5M"
It works fine, but cmd window is always visible while Apache is on.
Does anyone know how to hide this cmd window ?
This happens to me too with my access logs. I couldn't figure out a solid solution but for now I hide it through the command line using this tool found here:
https://steve.fi/Software/windowhide/
I've used it on Windows 7 and Windows Server 2012
Credits go to Steve Kemp .. steve#steve.org.ku
Revisiting... You might want to check on what user profile your server is starting and make sure it's running as a service.
My rotatelogs windows finally cleared away when I ran my server applications as a service..
Under the Task Manager the username is now SYSTEM and no longer my user name.
With this modification, an "Interactive Services Detection" window would popup presenting the option to view the prompts from a self-contained screen.
I also modified the httpd.conf and moved my "CustomLog" and "ErrorLog" lines to the directives as they were outside, though I don't think it'll affect the outcome.

Alfred unable to remember my preferences and always does reset after re-launch

Alfredapp in mac cannot remember my preferences. All my settings would be reverted to default while I relaunch the app.
I don't have Dropbox Sync in settings and I tried to repair the permission in Disk Utility, but it is still not working.
I found out a way to resolve this issue in https://www.alfredapp.com/help/troubleshooting/preferences/ with the fourth one "4. Create a New User Account" is helpful.
But I think I can't switch to an new account. So is there anyway to resolve this ? What happened to my current account ? Can I repair my account to make everything well ?
Thanks a lot.
You can try to set the following configuration:
Advanced->Syncing->Set sync folder
Set the folder to your user's directory. Just like ~/backup/alfred3.
Make sure your Dropbox does not take control of it. Then restart your alfred.

Resources