Permission denied on importing using psql - database

I am trying to import a sql file . Problem I am getting is permission denied. I saw some solutions online but none have worked for me so far. I have already tried giving everyone permissions to the file. Also is it weird that I am unable to run the regular psql command in my command promt. Is that weird or no? If you have any other solutions please let me know. I am running on a windows 10.
test=# \i C:\Users\Adrian\Downloads\personn.sql
C:: Permission denied

Related

Why is access denied for sudo user to run an update.php in mediawiki maintenance?

I'm a mediawiki admin, I have all the rights granted on the Database, I am a registered sudo user and when I try to run an update command it says: Wikimedia\Rdbms\DBConnectionError from line 1460 of /home/user/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Access denied for user 'user'#'localhost' (using password: YES) (localhost).
I have tried to sudo this command. I am a registered sudo user, I give my password correctly and then the same error pulls up like "access denied for user". I have installed a Patroller extension, I have edited the LocalSettings etc, the last thing I must do according to the guide is to run a php update.php. Since I am unable to do so, I always end up with this error message inside my mediawiki page when I click on "patrol edits": Fatal exception of type "Wikimedia\Rdbms\DBQueryError". So, my sql table hasn't been updated with the patrol extension because I cannot run the update command from my PuTTy.

After installation of Snowsql I am getting Failed to initialize log. No logging is enabled: [Errno 13] Permission denied: 'C:\\Users\\snowsql_rt.log'

HI I have downloaded and installed SNowSQL onto my Windows Machine 64 bit machine
After entering command snowsql -a zx12334 -u someone ; i am getting following error
Failed to initialize log. No logging is enabled: [Errno 13] Permission denied: 'C:\Users\snowsql_rt.log'
Any idea what is reason.
In my config file I have enabled log_file = ../snowsql_rt.log
For Windows go to:
%USERPROFILE%\.snowsql\
and update file config and replace this line:
log_file = ../snowsql_rt.log
with this line:
%USERPROFILE%\.snowsql\log
The suggested answer for Windows did not work for me as (I think) it is missing log_file =. To fix my issue in Windows, I went to:
%USERPROFILE%\.snowsql\config
And changed this:
log_file = ../snowsql_rt.log
to this:
log_file = %userprofile%\.snowsql\log
To login SnowSQL client , open you windows command prompt
and run the following command:
snowsql -a your_acct_name.your_region -u your_username -o
log_level=DEBUG
Also, if you are getting log error , then go to config file under snowsql application using
%USERPROFILE%\.snowsql\
and replace the log_file value with
%USERPROFILE%\.snowsql\log
This post and the answer helped me solve this problem when launching snowsql from my home directory on Windows.
The error states that it cannot access it in the Users folder but snowsql tries to create the files in the parent directory from which it is launched.
For what it's worth, You can avoid the error on windows by launching snowsql from a different directory that is not restricted by Windows.
For example, I have a directory C:\WS\SnowSQL that I launched SnowSQL from this location and I did not get the error reported above.
I had the same problem and resolved with the next assignment to log_file, in order to save log file in the same location of config file :
log_file = ~/.snowsql/snowsql_rt.log

snowsql command failing from root user / crontab

I am not able to run snowsql script from crontab. Its saying snowsql command not found.
Please help me to resolve the issue.
After including environment variables in crontab , I was able to resolve the issue. The above issue was also related to certificate verification which was resolved after including the certificate path.

Terminal permission denied with C program on MacBook Pro

When I am going to run "C" project using code block on My Mac then every time get same message that is Terminal Permission denied. Please help someone to fix this issue.
Try running chmod +x path_to_your_file to give the file execution rights. Then run it again

gcloud compute scp - permission denied error

I would like to transfer file from my local machine to Google cloud instance. Here is my command:
gcloud compute scp "C:\Temp\esim_replication.ipynb" nlp-3:
Here is error message:
pscp: unable to open ./esim_replication.ipynb: permission denied
ERROR: (gcloud.compute.scp) [C:\Program Files (x86)\Google\Cloud SDK\google-clou
d-sdk\bin\sdk\pscp.exe] exited with return code [1].
This is brand new error. Everything worked fine 2 weeks ago. I am on Windows 7 locally and ran cmd as Administrator. I tried the above command with and without quotations.
Any suggestions?
Go to gcloud via ssh:
gcloud beta compute ssh --zone "your_zone" "instance_name" --project "project_name"
Give full access to your file:
sudo chmod 777 esim_replication.ipynb
In case someone finds this like I did: I had a similar error message, and what did the trick for me was using sudo: sudo gcloud compute scp [LOCAL] [REMOTE]. Apparently there was the need for updating the project ssh metadata (even though copying in the other direction worked just fine).
Encountered the same error while transferring from my local Windows desktop to Debian VM in GCP.
Changed the permission of the destination folder to 777.
gcloud compute scp source_folder/File1.txt VM_instance_name:destination_folder
It worked!
What? from a windows machine?
'sudo' is not recognized as an internal or external command,
operable program or batch file.
It turned out that I already had identically named file at destination. This caused the error. But Patrick W comment is very helpful

Resources