- Ошибка «Permission denied» в Linux
- Изменение прав в терминале
- Изменение прав в файловом менеджере
- В заключение
- Kali linux socket: Permission denied, run ettercap failed #438
- Comments
- Neutrino3316 commented Dec 1, 2018 •
- ettercap can’t run
- netdiscover can’t run
- EnderNightLord-ChromeBook commented Dec 5, 2018
- Neutrino3316 commented Dec 8, 2018
- EnderNightLord-ChromeBook commented Dec 8, 2018 •
- Neutrino3316 commented Dec 8, 2018
- EnderNightLord-ChromeBook commented Dec 8, 2018
- EwanValentine commented Apr 2, 2019
- EnderNightLord-ChromeBook commented Apr 2, 2019
- EwanValentine commented Apr 2, 2019
- jawetzel1992 commented Apr 21, 2019
- antuspcm commented Jun 9, 2019 •
- T16bros commented Jul 7, 2019
- k1941996 commented May 1, 2020
- L96Github commented Jun 19, 2020
- YeMinAung2004 commented Aug 19, 2021
- How to resolve permission denied Linux error
- What is permission denied Linux error?
- Example of Permission denied Linux error
- How to resolve Permission denied Error
- Resolving Permission denied error related to script execution:
- Resolving permission denied Linux error while listing or writing to a file
- Resolving permission denied Linux error for specific user
- Download Free book
- How to resolve the «Permission Denied» error in Linux
- Bash permission denied Explanation and Solution
- Bash permission denied
- An Example Scenario
- The Solution
- Conclusion
Ошибка «Permission denied» в Linux
Все операционные системы семейства Linux имеют четко разграниченные права доступа. В своей домашней директории пользователь может делать все, что ему угодно, до тех пор, пока укладывается в отведенные рамки. Попытка выйти за них приводит к появлению ошибки «Permission Denied».
Изменение прав в терминале
Рассмотрим вариант, в котором необходимо прочесть текстовый документ, созданный другим пользователем. Файлы TXT в Linux можно просматривать непосредственно в терминале с помощью команды «cat».
- Заходим в каталог с интересующим нас документом. Набираем команду «cat filename», подставляя вместо «filename» имя нужного файла. На скриншоте показана ошибка «Permission Denied», выглядящая в русской локализации как «Отказано в доступе».
Получаем ошибку «Permission Denied» при попытке просмотреть содержимое файла
Проверяем права доступа к документу используя команду «ls -l»
Используем команду «chmod» и административные права для получения доступа
Просматриваем содержимое текстового документа командой «cat»
Изменение прав в файловом менеджере
Разберемся, как выполнить рассмотренную выше операцию в графическом интерфейсе, используя файловый менеджер из дистрибутива.
- Как видно на скриншоте, значок файла изначально имеет дополнительные символы, указывающие на то, что доступ у нему ограничен. При попытке посмотреть содержимое получаем графический вариант ошибки «Permission Denied».
При попытке открыть текстовый документ получаем ошибку «Permission Denied»
Открываем меню «Файл» и перезапускаем файловый менеджер от имени root
Набираем пароль root в окне аутентификации
Открываем параметры файла с помощью контекстного меню
На вкладке «Права» разрешаем доступ для группы root и остальных пользователей
Открываем ранее недоступный файл в режиме чтения и изучаем содержимое
В заключение
Как видим, избавиться от ошибки Permission Denied достаточно просто. Решив изменить правда доступа к системным файлам, лишний раз убедитесь, что полностью уверены в своих действиях и понимаете последствия вносимых изменений.
Источник
Kali linux socket: Permission denied, run ettercap failed #438
Comments
Neutrino3316 commented Dec 1, 2018 •
Device: [e.g. Pixel XL 2]
Android Version: 8.0.0
UserLAnd Version 1.0.2
Run UserLAnd
Click on Apps
Click on Kali
Then wait till it is installed
Next, I connect to this kali by ssh
ettercap can’t run
I install ettercap by this:
add try to run ettercap
and then get this error:
netdiscover can’t run
I install netdiscover by this:
add try to run netdiscover
and then get this error:
Am I missing something? Or does anyone have a good idea to solve this problem?
The text was updated successfully, but these errors were encountered:
EnderNightLord-ChromeBook commented Dec 5, 2018
you may need to use:
$ sudo su (to go into root mode) and then use your command
or
$ sudo (and your command)
Neutrino3316 commented Dec 8, 2018
$ sudo su (to go into root mode) and then use your command
or
$ sudo (and your command)
Still, it can’t work. I get the error Permission denied again.
Maybe that’s because my phone is no rooted?
EnderNightLord-ChromeBook commented Dec 8, 2018 •
no. the file system has access to itself so I don’t know.
Neutrino3316 commented Dec 8, 2018
no. the file system has access to itself so I don’t know.
I think maybe it’s because that we don’t have high privilege authorization to access and control the network device.
EnderNightLord-ChromeBook commented Dec 8, 2018
you might be right there.
EwanValentine commented Apr 2, 2019
Anyone find a solution for this?
EnderNightLord-ChromeBook commented Apr 2, 2019
Um not yet. It may be the program just can’t run in a chroot.
EwanValentine commented Apr 2, 2019
I’ve read it’s possibly missing ath10k drivers or something? I’m going to try a usb wifi dongle and see what happens
jawetzel1992 commented Apr 21, 2019
Same issue with my Samsung s9 plus, I’m thinking need external wifi card that’s compatible. Anyone else try one yet with same issues ?
antuspcm commented Jun 9, 2019 •
same on my s9 with ping. strace showed permission denied opening a socket with admin and raw capabilities. found a workaround in another thread so repost here for orthers. run su (even though you are allready root) and the new shell is initialised properly and then it works. looks like a kali bug, nothing to do with your hardware.
as root, in roots home dir, i ran:
echo «su» >> .bash_profile
to do this everytime the shell starts. now kali chroot is working as expected from the start.
note that you cant put su — in .bash_profile because that will run the profile again. just plain su will not.
T16bros commented Jul 7, 2019
i did sudo su
then sudo ettercad -G and it worked for me
k1941996 commented May 1, 2020
i dont think this is a permanent solution. Im running arp-scan —local then also erro arrives: my_lookupdev: Permission Denied
L96Github commented Jun 19, 2020
i dont think this is a permanent solution. Im running arp-scan —local then also erro arrives: my_lookupdev: Permission Denied
Yep same issue on Huawei P30 Pro. su sudo didn’t work in either arp-scan nor netdiscover
YeMinAung2004 commented Aug 19, 2021
i’m stucking on this i’m using Android kali linux but ettercap says this : ERROR : 13, Permission denied
[/build/ettercap-gsX8lN/ettercap-0.8.3.1/src/ec_capture.c:capture_getifs:114]
ccmni0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Permission denied
Источник
How to resolve permission denied Linux error
This article will teach you quickly what is permission denied Linux error. And also what ways you can avoid permission denied error in Linux.
What is permission denied Linux error?
This error comes when you try to list files or try execute the file inside the directory where you don’t have sufficient permission. Since Linux operating system is very particular about its security aspect.
Example of Permission denied Linux error
Let’s say you are a normal user who is trying to list or trying change the directory inside the /root file-system. Since you do not have sufficient permissions system will respond with permission denied error message as below:
One way to avoid such error is to switch to root user using su – command. However this solution is not recommended since it will gain unnecessary access to all the root file system.
How to resolve Permission denied Error
Resolving Permission denied error related to script execution:
Let’s say you have created a shell script for performing any task. but when you try to execute the script you may end with below error due absence of permission denied error.
Now to avoid such case you need to add execute permission “x” to the file myshell.sh using chmod command as below:
In the last output you can see that there is “x” (execution) permission added after chmod command. So next time when you try to execute the shell script , it will execute without any error.
Resolving permission denied Linux error while listing or writing to a file
In this type of permission denied error you try to list or write the file in which you do not have sufficient permission to do so as below:
If you look at the permissions of the “myfolder” directory using ls -l command you will come to know about the permissions.
As per the permission given in above output only owner of the directory who is root can have all permission that is read, write and execute. So in such case you need to change the permission of the directory to read using below chmod command:
Now this time when normal user manmohan try to list directory he will not get the permission denied error.
In case you want to have write permission on this directory you need to specify w flag as well in chmod command as below:
Same is applicable to file level permission as well.
One more way is to changing the ownership of the directory using chown command. Since in our example we are getting error for user manmohan we will change ownership of the directory “myfolder” using below command.
Since manmohan user is now the owner of the directory he can able to do any operation on the directory. In case you want to recursive permission do not forget to add -r while chown command as below:
Resolving permission denied Linux error for specific user
In above method of changing the permission using chmod is not suitable as per my opinion. Because when you give permission to others, it will be open for all the users within the system. Which is wrong in terms of security perspective. To resolve this error specific to user you can implement it using access control list or ACL. Follow my article on Access control list ACL for the same.
Download Free book
Get your free copy of Linux command line Cheat Sheet.
Источник
How to resolve the «Permission Denied» error in Linux
While using Linux, you may encounter the error, “permission denied”. This error occurs when the user does not have the privileges to make edits to a file. Root has access to all files and folders and can make any edits. Other users, however, may not be allowed to make such edits.
Remember that only root or users with Sudo privileges can change permissions for files and folders.
The permissions can be changed using the chmod keyword. The syntax for the command is:
chmod flags permissions filename
- flags are the additional options users can set.
- permissions define if the user can read, write, or execute the file. They can be represented using symbolic or octal numbers.
- filename is the name of the file whose permissions are changed.
Here is an example where users can read, write, and execute a file; whereas, group and others can only read it.
Here, each letter has a meaning:
r gives read permissions
w gives write permissions
x gives execute permissions
The same command can be run using octal notation:
Here, each digit represents the sum of the permissions allowed:
4 gives read permissions
2 gives write permissions
1 gives execute permissions
0 gives no permissions
The sum of these permissions is used to represent each type of author.
Источник
Bash permission denied Explanation and Solution
Files on an operating system usually have permissions, making the file accessible to a limited range of people. For instance, some files on a computer are accessible only to administrators; other files are only accessible to a particular user.
- Career Karma matches you with top tech bootcamps Get exclusive scholarships and prep courses
If you try to run a file to which you have no access on a Linux computer, you will see a permission denied error. In this guide, we’re going to talk about the cause of this error and how you can solve the error. Let’s begin.
Bash permission denied
The Bash permission denied error happens when you try to run a file which you do not have permission to run. This may happen if a file can only be executed by a particular user or a group of which you are not a member.
- Career Karma matches you with top tech bootcamps Get exclusive scholarships and prep courses
Do you want to learn more about how a coding bootcamp can help you learn to code? Get started by finding the right bootcamp for you along with unlocking additional information about bootcamp cost and reviews.
On a Linux operating system, there are three types of permissions:
You can have permission to read and write a file without having execution privileges. Thus, if you encounter a Bash permission denied be sure to check whether you are allowed to run the file. You can check if you have permissions over a file by using the following command:
This command will give you information about file permissions. We discuss the output of this command in our The Solution section later in the article. Let’s look at an example scenario featuring the permission denied error, with a corresponding solution.
An Example Scenario
We have a file called example.sh. We can see this file by running the ls command. The ls command returns the following:
Career Karma entered my life when I needed it most and quickly helped me match with a bootcamp. Two months after graduating, I found my dream job that aligned with my values and goals in life!
Venus, Software Engineer at Rockbot
Find Your Bootcamp Match
We want to run our example.sh file. To do so, we can use the ./ notation:
This command lets us run the example.sh file which is present in our ./ directory (the directory we are presently viewing). Let’s see what happens when we try to run the file:
Our command returns an error.
The Solution
Our Bash shell is telling us that we do not have permissions to run our file. We can check what permissions we have by running the ls -la command:
We do not have execution privileges over any of our files. If there were an x after the rw in the first entry of the output above, we would know we can execute our file. The three characters after the first one represent read, write, and execute privileges for a user. Our group also does not have write or execute permissions.
To solve this issue, we need to give ourselves execution privileges:
This command gives our user execution (“x”) privileges over the example.sh file.
We can only run this command if we are allowed to change the privileges of the file. If this file was protected (owned by root, for example), then we would not be able to change this file.
The file is owned by the james system user so I can alter the file permissions on my james account. I could also use sudo to alter the file privileges, although this is not necessary because my user account has the necessary access.
Conclusion
The Bash permission denied error indicates you are trying to execute a file which you do not have permission to run. To fix this issue, use the chmod u+x command to give yourself permissions. If you cannot use this command, you may need to contact your system administrator to get access to a file.
Do you want to learn more about Bash? Check out our How to Learn the Command Line guide. This guide comes with top tips on how to learn Bash. You will also find a list of resources to help you accelerate your learning journey.
About us: Career Karma is a platform designed to help job seekers find, research, and connect with job training programs to advance their careers. Learn about the CK publication.
Источник