Arduino IDE 2.3.4 read-only issue

Moving to my new macbook, opening my sketches made on old macbook, but the IDE doesn't let me edit them, READ ONLY EDITOR message.

Path to Documents is a symlink, using Dropbox to secure all my user files.

This is a head ache, I need to continue work. Anyone have a work around to edit symlinked files?

You probably need to change permissions, I would expect Dropbox to NOT allow write access fro a non-owner unless the owner gave permission.

Hi @j05hu4k. The Arduino IDE developers are tracking this bug here:

If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:


:exclamation: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.


Until the bug is fixed, please make sure to avoid using symlinks.

Thanks!!

Subscribed to the issue on Github.

Why would anyone undermine the symlink functionality of all OS'es just because they don't trust its users. At least make it a configurable option.

For now I'll just edit everything in VSCode and compile it with Arduino Studio.

Kind regards, Joshua

You are welcome. I'm glad if I was able to be of assistance.

You seem to be under the impression that this is an intentional design. It is not. It is a bug.

I run into this both on my Windows machine as well as on my Ubuntu machine as I
use symbolic links to libraries and/or to directories out of my Arduino directory for test sketches for different boards.

Work around:
a) Open up the sketch and see that it has the read only...
b) close the sketch
c) Use the open recent menu and reopen - and it typically than opens up fine.

2 Likes

Sorry I think my confusion came from reading somewhere that this issue is caused because users were not allowed to open and edit library files I sort of thought this issue was by design, a deliberate feature.

After reading the issue report more thoroughly I conclude: my issue was the same. I copied my sketches to the Arduino folder in my user's Documents dir (symlink to: HD:Users:me:Dropbox:mac:Documents:Arduino). Opened a sketch USING THE Sketchbook Manager and IDE went into read-only mode.

When I simply use the Finder and open it by double clicking the sketch, it opens fully unlocked :slight_smile:

The IDE does allow library, core, and toolchain files to be opened, but it intentionally makes them read-only to prevent users from editing them under the assumption that those edits would only affect the currently opened sketch (when they would instead affect all sketches using the library, and thus possibly cause difficult to troubleshoot problems.

The system only allows writing to files that are under the sketch folder. I believe the bug is that the sketch folder path is considered to be the unresolved symlink path, while the file path is considered to be the resolved path. So this makes the IDE think the files under the sketch folder are actually at a path outside the folder. The solution should be to resolve the sketch path when making the determination of whether a file is inside the sketch.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.