Permission denied to read datadog.yaml file - google-cloud-platform

I've installed the datadog app on my linux vm but i can't seem to read the datadog.yaml agent file.
[ Error reading /etc/datadog-agent/datadog.yaml: Permission denied ]
My linux box is hosted on GCP, do i need to configure permissions?

you can open it by navigating to the directory it is in, and then typing
sudo nano datadog.yaml.
You need root permissions to view the file as far as I know.

Related

Jupyter notebook permission denied, unable to save

I am having permission denied for Jupyter notebook running on Ubuntu, AWS E2 instance. Below is the image for the error
I have tried to use other browser, reinstall it and clear cache. None of it works.
If your notebook is configured with some auth code (generated by notebook by default), and you've cleared your cache, and cookies, you will get the screen similar to below:
Here you can use the token shown in terminal, while running the notebook, the log will be similar to the below:
To access the notebook, open this file in a browser:
file:///home/ubuntu/.local/share/jupyter/runtime/nbserver-19740-open.html
Or copy and paste one of these URLs:
http://ip-123-1-1-123:8888/?token=abcdefghijl
or http://127.0.0.1:8888/?token=abcdefghijl
and if you want to run notebook without authentication you can run the below command:
jupyter notebook --ip='0.0.0.0' --NotebookApp.token='' --NotebookApp.password=''
Also try creating a new notebook, instead of accessing the Test.ipynb again, so that you can figure out if the issue is from the specific file or whole server.
The main reason is i don't have the permission to overwrite the file. First of all, i create the file at /home/ubuntu, which I don't have permission of. So i create a folder to store the file inside it. Other than that, i also done quite a lot modifications including adding the inbound rules and the permissions, i think some of it did help. I list out some of the website i think is very useful in tackling this issue:
PermissionError: [Errno 13] Permission denied: Cannot open Jupyter on Browser despite running correctly on AWS EC2 instance
https://stackoverflow.com/questions/53097180/permissionerror-errno-13-permission-denied-when-accessing-to-aws-ec2#:~:text=Make%20sure%20you%20type%20https,with%20version%2070%20or%20newer.

Permission Denied / Operation not permitted

I was having a issue while experimenting with my samsung android 6.0 Device. I have downloaded Termux( Linux terminal for android which has all linux terminal functionality ). And i have converted my phone into a ssh server using SSH Client app from playstore.
So the main problem is that when i try to generate a ssh key pair using command ssh-keygen it works but it stores the ssh key into data/data/com.termux/files/home/.shh but i want it in sdcard/key/ ( I have created a directory name key ). But when i try to generate a key pair in sdcard/key it show permission denied. When i try to copy or move from data/data/com.termux/files/home/.shh/ using cp data/data/com.termux/files/home/.ssh/key_pair sdcard/key it show me permission denied so i tried to create another folder in sdcard/ and gave it permissions for read-write-execute using chmod 777 dir_name it shows me operation not permitted.
So i done a bit research on this topic on google, i found that i have to root my device then i tried to root my device using KingoRoot, iRoot, adb but it showed that Your device is too strong to bee rooted in fact i gave those app all permission and there is no antivirus or in built security disabled on my device. Then i thought to directly place it in sdcard/key but then i got to know that i cannot move anything from data/data/com.termux/files/home/.shh.
And when i tried to move files via ssh server or upload files on my ssh server via ssh admin#192.168.1.5 -p 2222 using scp command it showed me file not found but the file is in the correct directory and correct path.
And please answer the following questions that i have regarding the issues above that 1> How to move files from localhost to ssh server 2> how to root device if it is too strong to be rooted(any method)
Thanks !

Windows 10 import pem file for openssh

Windows 10 Pro
OpenSSH client is already installed.
I have a pem file supplied by my AWS EC2 instance.
How and where do I install the pem cert in Windows 10.
mmc doesn't recognize the format.
This is the ssh command I want to run.
ssh -i c:\my.pem ec2-user#xx.xx.xx.xxx.
As expected I get WARNING: UNPROTECTED PRIVATE KEY FILE ... ec2-user#xx.xx.xx.xxx: Permission denied
but this shows the OpenSSH client is working.
I've searched the internet and SO to no avail .
See ibug's answer here:
https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open
"You locate the file in Windows Explorer, right-click on it then select "Properties". Navigate to the "Security" tab and click "Advanced".
Change the owner to you, disable inheritance and delete all permissions. Then grant yourself "Full control" and save the permissions. Now SSH won't complain about file permission too open anymore.
It should end up looking like this:
"
I kept my pem files in this location
C:\Users\<user name>\.ssh\pems
And from user folder, that is C:\Users\user name>, used this command.
ssh -i ".ssh\pems\key.txt" centos#XXX.XX.110.1X5

Not able to upload files on AWS server root folder getting 'file permission error'

I'm trying to upload a google webmaster file to aws root folder with Filezilla. I'm getting the following error
and my root folder permission is set to 755. But still i'm getting file permission error.
You are not authorized to access this directory. Ask your administrator/Root user to run this command.
sudo chown -R USER_NAME:USER_NAME FOLDER_PATH
USER_NAME: Your username
FOLDER_PATH: Folder path
I have also faced the same issue earlier so I sorted it like this.

Permission denied. Error code: 3 Error message from server: Permission denied

I am logging into my amazon aws production box using WinSCP and i have successfully setup Tomcat 6. But in webapps folder when i transfer some webservice i get error as:
Permission denied.
Error code: 3
Error message from server: Permission denied
Please help me out to resolve this issue
You haven't mentioned what instance type you are using, but it sounds like you are on some flavor of Linux. You need to chmod or chown the webapps directory so you can place files there, or you can place them elsewhere (like your home directory), then log in and use sudo mv to move it in place.