I am newer to linux and how to use terminal and I am trying to work with an arduino but the ports have access denied, and I am follow the steps to fix that issue, and I got to the part where you need to create a rule and edit it. I am in root and created the file "99-arduino.rules". After I create the file I need to go in and edit it, but when I use the ./ to enter it, it says permission denied. After that I went through the file system and found the actual folder and file, and entered the file. I tried entering the code, but when I went to save it, it says permission denied. How do I get the proper permission to edit/save the file either in terminal or as the file.

  • You need to be in the group dialout to have access to the serial ports. sudo adduser $USER dialout. Then reboot your computer and it should work.
    – Kev Inski
    Aug 24, 2018 at 7:48
  • I tried this and it is still giving me this error: Arduino: 1.8.5 (Linux), Board: "Arduino/Genuino Uno" Error opening serial port '/dev/ttyACM0'. Try consulting the documentation at playground.arduino.cc/Linux/All#Permission This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. I have tried following almost all the directions for help on their website but haven't gotten anywhere, I have not tried the files with the locks on them because it said with newer versions its not needed.
    – Zach L
    Aug 24, 2018 at 23:13

1 Answer 1


Have you tried changing the permissions of the file you want to edit? Something like this might work:

sudo chmod u=rwx,g=,o= <path-to-file>

After doing that, try to edit the file.

If that works, you may want to restrict the permissions somewhat when you're done editing. Before you do the above command, you should do:

ls -l <path-to-file>

then you can see what the permissions on the file are before you change them. This may explain why you couldn't write to the file before, and will also give you safer permissions that you can revert to when you're done editing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .