how do I solve 'erpnext' permission denial error? - ubuntu-18.04

when I run this command 'bench init erpnext && cd erpnext' on terminal I get this error: [Errno 13] Permission denied: 'erpnext'. So I tried this 'sudo bench init erpnext && cd erpnext' but got the message: You should not run this command as root. I am using this command so I can install ERPnext on my ubuntu.
Please advise.

The issue is raising because some of the files might be owned by some other user instead of frappe.. I think this might solve this issue chown -R frappe:frappe *

Related

~/.p4enviro in ubuntu Permission denied

When I try and run ~/.p4enviro in Ubuntu
I get the following message: Permission denied
I have tried logging is as toot but that didn't help.
~/.p4enviro isn't an executable. The permission error is because it doesn't have the +x permission bit set. You can set it with chmod +x ~/.p4enviro but it still won't do anything useful when you try to run it.
The P4ENVIRO file (default ~/.p4enviro) is used as a configuration store for the p4 set command: https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_set.html

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

error An unexpected error occurred: "EACCES: permission denied

I am getting an error while running npm install for a react application:
An unexpected error occurred: "EACCES: permission denied, unlink
'/home/ats/react-app/myapp/node_modules/#babel/helper-module-imports/LICENSE'".
Can someone help me sort this error out?
I had the same problem and I solved it like this:
Remove node_modules folder of your project manually.
Then yarn install or npm install.
Try changing the folder permissions to have the correct ones. If you consider there is no drawback to have the folder with full permissions this command should solve your problem:
sudo chmod -R 777 folderName
Execute as sudo if you are using Linux.

Ubuntu - node permission issue

Trying to run yo angular:app myWebApp shows me following Error:
What should I do to overcome the permission error?
Use sudo with your command. Like
sudo yo angular:app myWebApp
. If it asks for your password enter it and it will work.

How to get rid off - sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins

I am trying to configure apache2 with cgi (python). For that, I have to change permissions of some folders and files but I am getting sudo fatal errors every time I try to change permission of a file or a Folder.
For Example:
1
j#ubuntu:/etc/apache2$ ls
apache2.conf envvars magic mods-enabled sites-available
conf.d httpd.conf mods-available ports.conf sites-enabled
j#ubuntu:/etc/apache2$ sudo chmod 777 httpd.conf
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
...................................................................................
2
j#ubuntu:/usr/lib/cgi-bin$ sudo /etc/init.d/apache2 restart
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
...................................................................................
3
j#ubuntu:/usr/lib$ sudo chmod -R 777 /usr/lib/cgi-bin
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
...................................................................................
Note:
j#ubuntu:/etc/apache2$ ls -l /usr/lib/sudo/sudoers.so
-rwxrwxrwx 1 root root 177452 Jan 31 2012 /usr/lib/sudo/sudoers.so
Any help would be highly appreciated !
If you have docker installed on your host, you can leverage its permission vulnerabilities on volumes to solve this issue.
Run
docker run -it -v /usr/lib/sudo:/tmp ubuntu:xenial
Once inside the container, being the root user there, you can:
cd /tmp
chown root sudoers.so or chmod 644 sudoers.so depending on the exact issue
It's not a really clean solution but it solves the issue.
You have to login to root shell to resolve this sudoers.so permission issue. If you have root account login, directly login to root shell otherwise search something like "How do I boot into a root shell" or "Drop to root shell prompt". If you use Ubuntu you can follow this link https://askubuntu.com/questions/92556/how-do-i-boot-into-a-root-shell.
Once you are in root shell change the permission of the file /usr/lib/sudo/sudoers.so to
#chmod 644 /usr/lib/sudo/sudoers.so
for OSX, there is diskutil command to repair disk permissions:
diskutil resetUserPermissions / `id -u`
it will take a while :( ... you might first try to open script editor, create new script and execute:
do shell script "chown -R root /usr/local/libexec/sudo/sudoers.so" with administrator privileges
if that does not work, the repairpermission should do the trick.
Please try to login as a root user and change the file permission for the directory as
chmod 700 /usr/lib/sudo/sudoers.so then it will solve your problem.
It worked for me!
Try this:
pkexec chmod go-w /usr/lib/sudo/sudoers.so

Resources