Permission Issues with ls command - permissions

I am a beginner. I have kept my nauty files in C:\cygwin\home\jim\n , I would like to use
ls
to see files in n,but I am getting error after
ls
coomand in cygwin.
$ ls
-bash: /usr/bin/ls: Permission denied
How can I solve the problem?
PS: Do I need to include any special package?

Related

neovim :PlugUpdate produces permission denied on all plugins

When entering in vim and then running :PlugUpdate all the plugins can't be updated because of the error
x <PLUGIN>:
error: cannot open .git/FETCH_HEAD: Permission denied
I was able to upgrade VimPlugin with :PlugUpgrade without any issues.
I was able to update this before without any issues about a month ago, I found an article saying that I need to change the ownership of the directory with chown which I am assuming would need to be done at $ sudo chown -R ~/.config/nvim/ but if I don't need to change owner then I'd prefer not to
I was able to resolve it by changing ownership with $ sudo chown -R $USER ~/.config/nvim/
note make sure to $ echo $USER to make sure that it's the user you wish to change the ownership of the directory

How to solve permission denied error with react native?

UPDATE:
In terminal I see this file has "-rw-r--r--". What command do I need to run in order to change this to the right permission?
I'm trying to run
react-native run-ios
and I keep getting the error shown below:
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES: permission denied, open '/Users/sharatakasapu/Desktop/projects/albums/node_modules/.cache/#babel/register/.babel.7.2.2.development.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at save (/Users/sharatakasapu/Desktop/projects/albums/node_modules/#babel/register/lib/cache.js:52:15)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
I tried to follow along at why babel stores .babel.json in USERPROFILE path but didn't understand how to use this to solve the problem I have as I'm new to react. Any advice on how to address this?
About this i have seen this issue quite some time ago!
there can be too cases they might sound pretty lame though but bear with me and read!
1: the user profile you are using has no access to the files that are being targeted! or you might not have access to root node Packages! what you can do is
sudo chmod -R 777 /Users/sharatakasapu/{your node module path}
but the solution one seems a little trivial!
2: allowing your present user to read all cache and property files + folders! by doing
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
for more you can follow these links .
for solution 1: stackLink
for solution 2: githubLink
Had the same problem.
This worked for me:
run
whoami to get the current user.
run: sudo chown -R ownerName: /path/to/node_modules
It looks like you have no permission- try this
sudo chmod -R 777 {path}
You can try having a look at these two examples:
https://github.com/bower/bower/issues/2262
Error: EACCES: permission denied
Also try running your terminal as an Administrator if possible.
If you give permissions, your error must no longer be visible.
Generally on a MAC, the command is:
sudo chown YourName:staff /Users/YourName/.babel.json
anyone can move to project inside just move to ios folder there you can find your node module inside that check the path of every script and navigate them in terminal then try to use this command chmod 755 yourscriptname.sh
Note for my future self. An incompatible drive format might be the error:
"Permission Denied" in Node on Linux, when running start-script /w local nodemon/mocha/babel-node
Give permission to the .babel file

Permission Denied error for Vagrant

I made the mistake of once running "sudo vagrant up" and now whenever I run "vagrant up" it gives me the following error
==> default: Running cleanup tasks for 'chef_solo' provisioner...
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:492:in `initialize': P Permission denied - /Users/mkv/.vagrant.d/data/lock.fpcollision.lock (Errno::EACCES)
I've tried deleting the .vagrant folder and also the Cheffile but I always get the same error.
What can I do to sort this out?
The issue is related with permission which you accidentally run the application with root.
Follow the steps:
Delete /Users/mkv/.vagrant.d/data/lock.fpcollision.lock and run vagrant up again.
Find any files are owned by root under /Users/mkv, include hide files. if found, change it back to your own user account.
You can run below command to find out files owned by root
find /Users/mkv -type f -user root -print
For those who wonder how to change a user to your current one, using find command:
sudo find ~/.vagrant.d/data/lock.fpcollision.lock -type f -user root -exec chown $USER {} \;

Drush make directory is not writable

I am running a drush make and getting the following error
Directory /Applications/MAMP/htdocs/geoslate/sites/default exists, but is not writable. Please check directory permissions. [error]
Unable to copy /tmp/make_tmp_1365076314_515d695acefc3/__build__/sites/default to ./sites/default. [error]
Cannot move build into place
I am not an expert on permissions in the terminal, can you give me a hand to give the directory the write permisions. I have tried chmod -w /Applications/MAMP/htdocs/geoslate/sites/default and chmod u+x /Applications/MAMP/htdocs/geoslate/sites/default
chmod +w <directory> solved the problem

~/.ec2/id_rsa-gsg-keypair not accessible: No such file or directory

I'm trying to launch a Hadoop cluster on Amazon ec2, using the instructions in "Hadoop in Action" (also here: http://wiki.apache.org/hadoop/AmazonEC2).
I've set up my private ssh key and configurations, but when I try to launch a cluster using the command-line tools:
hadoop-ec2 launch-cluster test-cluster 2
I repeatedly get this error:
Warning: Identity file ~/.ec2/id_rsa-gsg-keypair not accessible: No such file or directory.
Permission denied (publickey,gssapi-with-mic).
The ~/.ec2/id_rsa-gsg-keypair definitely exists, though, and I did chmod 600 it:
> chmod 600 ~/.ec2/id_rsa-gsg-keypair
> ls -l id_rsa-gsg-keypair
-rw------- 1 my-username
Any idea what's wrong?
You may have already realized this, but the problem is possibly related to the ~/ path usage. Try using the absolute path /home/username/.ec2