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.
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.