I have tried to edit files on my pi 3, such as pyaudio.py but cannot because system keeps telling me permission denied, why is this? How can I get admin acces even though it is my system? Anyone one please help

2 Answers 2


A lot of commands need root privileges to be executed properly. You can grant them command-wise starting your commands with sudo or you can change the permission settings file-wise e.g. allowing all users to read, write and execute a file by using the command sudo chmod 777 /path/to/your/file.

However, giving all permissions to everyone circumvents the built-in permission system which is a security safeguard. You should always think about which user really needs what permissions and only grant those. For more information on what chmod does and what those numbers mean, read this post


I don't know what pyaudio.py does, or where it is located. I assume in one of the system directories, in which case modifying it is not a good idea.

The normal way to modify system files is sudo nano /path/pyaudio.py (or other editor of your choice), but first you should explore if a local copy or other .config option is available. If you do choose to modify it make a copy first.

It is a BAD idea to modify permissions of system files.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.