Individual symbolic links don't work with autorefresh
Details
On a Linux server, if you create a symbolic link for each addon file
- autorefresh won't see any changes made to that addon
- lua_openscript won't load any changes
You basically have to restart the map every time
Steps to reproduce
-
Create two addon directories with identical directory structures.
- One for the Garry's Mod server
mkdir -p /path/to/server/dir/addons - The other for shared addons
mkdir -p /path/to/shared/dir/addons
Example:
/home/steam/Steam/steamapps/common/GarrysModDS/garrysmod/addons
/shared/GarrysModDS/garrysmod/addons
- One for the Garry's Mod server
-
Place an addon inside the /path/to/shared/dir/addons
-
Automatically create symbolic links:
-
cp --preserve=timestamp -dRns "/path/to/shared/dir/"* "/path/to/server/dir/"
This command creates symbolic links (-s) for all files and directories from the shared folder into the server folder, preserving timestamps (-p), not overwriting existing files (-n), and recursively handling directories (-R).
- Your server directory should now have addons from the shared directory. Go check.
- Start the server
- Edit an addon inside the shared directory (changes should automatically reflect in the server directory because of the symlinks)
Version of the game
Protocol version 24 Exe version 2025.03.26 (garrysmod) Exe build: 18:53:48 Jul 16 2025 (9748) (4000) GMod version 2025.07.23, branch: unknown Linux 32bit Dedicated Server
Beta
None/Public/Default/Main
Related: https://github.com/Facepunch/garrysmod-issues/issues/5793
I believe there has been another regression.
Looks like lua_refresh_file is reloading changes I make to my symlinked addons after updating my server.
Was this issue addressed?
No, it was not looked into, otherwise there'd be a comment here saying so, or the issue would be closed as completed.
lua_refresh_file imitates what autorefresh would do when the OS sends GMod the notification that a file has changed.
Now, I may misunderstand something, but from what I can tell you are making symlinks for each individual file separately? That is not really the intended way the game expects you do this, it expects you to symlink folders, most commonly the individual addon folders inside addons/. Symlinking entire addons/ folder works too, at least on Windows in my personal experience.
That being said, the game does recursively subscribe to change events for all folders (not files) in addons/ (unless -disableluarefresh is used), so I don't really see why it wouldn't work for you.