Unable to execute the WSO2 OB merge script inside WSO2 IS, getting permission denied? - permissions

Icp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/88/dbe33acc44c56db8cdd05f449ed90c7a30c4c5': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/89/8b56f1ce4093ef95f88d1a878870f38ef928d1': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/8b/4deef3cf9f3ae3308991bf475c148f1bd7c642': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/8b/680ca366e4b4ee5cdc83f801b8cd2783f8b5d6': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/8b/8507bf49a11770a599698f8cad96573928aa4c': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/8b/de389221af972270b635e2166e0362e7daa403': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e3/30ac594fe120971788519e372b916e3190d1a7': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e3/fd553cf55e781eb0b6e9ef94e3d4745d530112': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e4/e1d52c9e9952e1ae0edb088a8ad845bd2f115f': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e5/1d2b50ecdf8baf390e8f3808fe159d03700977': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e5/880a783b98a27870bef5a80b929586de08f214': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e8/95fadb3158676253a81f8dc60cc382c976e5b9': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e8/c24c0aae19f57c4d9d10adfb475be124f2cb0f': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e8/ffebf688e7615aefa84f030e5d6fe7c7909423': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e9/3adf86fa274cb44bc1ece390487ed8b45fcf27': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e9/42d70f5cd4fece5b76d4ac766641ba55e48a66': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/e9/c91a9b1aa7f0df401e722b0f8cdbf2bbc6fd86': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/ec/3c7af690348ec7b6293efbbd572b9cc0d6fad6': Permission denied
cp: cannot create regular file '/f/WSO2 OB Practice/BaseProducts/wso2is-5.11.0/WSO2/Desktop/HelthCare/.git/objects/ec/6d8754eb2341e92846fcd1be42471344a22a30': Permission denied

It would be helpful to know which version of OB you are trying to setup.
Please rename the WSO2 OB Practice folder to a name without spaces like WSO2_OB_Practice and provide executable permission to the merge script using the command chmod +x <filename>.sh

Related

Access denied when copying BigQuery tables between GCP projects

I have projects P1,P2 in europe-west2. In both projects I have same dataset/table structure at same location europe-west2.
In P1, I created a service account and added the same service account (SA) to P2, like here:
https://gtseres.medium.com/using-service-accounts-across-projects-in-gcp-cf9473fef8f0
In both projects, the SA has role BigQuery Admin.
I want to copy a table from P1 to P2. I do
bq --project_id P1 --service_account_credential_file <path to SA json> cp P1:dataset.table P2:dataset.table
The script seems to find the tables and asks
cp: replace P2:dataset.table? (y/n)
After confirming, cp says:
BigQuery error in cp operation: Access Denied: Project P1: User does
not have bigquery.jobs.create permission in project P1.
If I try to copy in the other direction then I get:
BigQuery error in cp operation: Access Denied: Permission bigquery.tables.get denied on table
P1:dataset.sessions (or it may not exist).
This issue could be about permissions. You need these permissions:
On the source dataset:
bigquery.tables.get
bigquery.tables.getData
On the destination dataset:
bigquery.tables.create.
Permission to run a copy job:
bigquery.jobs.create IAM permission.
bigquery.datasets.create permission
Also, you need these IAM roles that include the permissions you need to run a copy job:
roles/bigquery.user
roles/bigquery.jobUser
roles/bigquery.admin
You can use this command to copy tables:
bq --location=location cp \
-a -f -n \
project_id:dataset.source_table \
project_id:dataset.destination_table
You can read this documentation.

i want to transfer file from linux to windows from root using scp/pscp commands, but iam getting access denied error

i want to transfer a text file from Linux (centos) to windows using scp/pscp commands from root, but I am getting access denied error when executing scp -r {file name} user#ip:/

Could not create directory '//.ssh': No such file or directory

I'm running SSHD on my Windows machine, which I downloaded from http://www.apache.org/dyn/closer.cgi
I was able to run SSHD, but whenever I tried to connect from the same machine, it gives the following error.
C:\Users\fk>ssh fk1#localhost -p 8000
Password authentication
Password:
Password authentication
Password:
Password authentication
Password:
fk1#localhost's password:
Permission denied, please try again.
fk1#localhost's password:
Permission denied, please try again.
fk1#localhost's password:
Permission denied (password,keyboard-interactive,publickey).
I thoght it related to not having publickey, so I tried to create publickey by running ssh-keygen, but it gives the following error.
C:\Users\fk>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa):
Could not create directory '//.ssh': No such file or directory
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
open //.ssh/id_rsa failed: No such file or directory.
Saving the key failed: //.ssh/id_rsa.
Could anyone help me to solve this problem?
Thank you.
After this :
Enter file in which to save the key (//.ssh/id_rsa):
Enter a valid Windows path , D:\id_rsa to create private public key pair , and add public key to other hosts known hosts file

Cannot create new application through web2py admin interface - Permission denied

I have deployed web2py and integrated it with apache on my redhat linux AMI according to the instructions given at
http://www.web2pyslices.com/slice/show/1423/deploy-web2py-on-fedoracentosred-hat
Everything is working fine. I can open welcome page on port 80 and 443. When I try to access admin interface over HTTP, request gets denied as expected. But when I try to access interface over HTTPS, it asks for password. When I enter the password which I set while installation it redirects me to error page with some ticket number. When I click on the link it asks for me to provide admin password again. So I tried to read the file from errors folder of web2py application. This file says
IOError: [Errno 13] Permission denied: \'/web2py/applications/admin/private/hosts.deny\'\n'
I thought this might be related to permissions so I gave full access to hosts.deny file. It is still exhibiting the same behavior. Please help me out.
Above problem has been solved by deleting existing hosts.deny file.
Now I am able to access admin interface. However when I try to create a new application it doesn't allow and shows error message :
Traceback (most recent call last):
File "/web2py/gluon/admin.py", line 163, in app_create
os.mkdir(path)
OSError: [Errno 13] Permission denied: '/web2py/applications/adv01'
I have checked out permissions of applications directory in web2py and it has drwxr-xr-x. access to apache user which also is its owner. I changed the permissions of the directory to drwxrwxrwx but it made no difference. Why is it still denying access?
I have found out that this issue is related to SELinux. So I run the following command to set context of applications directory:
sudo chcon -R -v -t httpd_sys_rw_content_t applications
It is now showing similar error message for other file as given below:
Traceback (most recent call last):
File "/web2py/gluon/admin.py", line 175, in app_create
w2p_unpack('welcome.w2p', path)
File "/web2py/gluon/fileutils.py", line 322, in w2p_unpack
tarfile = open(tarname, 'wb')
IOError: [Errno 13] Permission denied: '/web2py/welcome.tar'
I tried same command for this file as well but found out that there is no such file present there. Why welcome.tar is missing? How would I get it? Please suggest.
This is by design with web2py. You should be able to edit /applications/admin/models/access.py so that you can access over http.

upload files to ec2 from local using scp

I am using scp to upload files from local to ec2, and I got the permission error.
Permission denied (publickey).
lost connection
How do i fix this?
You need to get your ssh keys uploaded.
Here's a link to an article showing you how to set this up:
http://alestic.com/2010/10/ec2-ssh-keys
Also, see this:
AWS ssh access 'Permission denied (publickey)' issue