Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
To ensure permissions are correct, run this command on Mac 
 what should i replace with LOGIN? as im getting error chown: LOGIN: illegal username.
$ sudo chown -R LOGIN /usr/local/lib/node_modules/cordova

For Read and Write permission:

chmod -R 777 '/Users/username/.cordova/lib/tmp'
in this getting error like no file or such directories

What I have tried:

I tried different ways but not able to solve this.
Posted
Updated 28-Jan-20 22:15pm

1 solution

You should replace LOGIN with the unix username and groupname of the account which should be the new owner of specified path.
If username is username, the command is then
sudo chown -R username:username /usr/local/lib/node_modules/cordova

Regarding your chmod command, the error message tells you that the path /Users/username/.cordova/lib/tmp does not exist.
Try
sudo chmod 777 /home/username/.cordova/lib/tmp

Linux chmod command help and examples[^]
Linux chown command help and examples[^]
 
Share this answer
 
Comments
Member 14704249 29-Jan-20 4:57am    
First solved.
second giving me same error.
Richard Deeming 29-Jan-20 5:32am    
Which would suggest the file or directory you're trying to modify does not exist.

Did you forget to replace the username in the path with your actual UNIX username?
sudo chmod 777 /Users/--YOUR-ACTUAL-USERNAME-GOES-HERE--/.cordova/lib/tmp
Member 14704249 29-Jan-20 6:09am    
No, I didn't forget that.
By the way i'm using mac so is there anything to do with my code?
phil.o 29-Jan-20 6:40am    
Maybe try to remove the single quotes around the path. Unix paths do not need to be quoted unless there are some whitespaces in names. Otherwise, what can we tell? If the system tells you the path does not exist, then thoroughly confirms that the path actually exists. We do not have access to your filesystem, so all we can do at this stage is guessing.
Member 14704249 29-Jan-20 6:42am    
Okay i'll try it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900