Package Manager Stores Packages without Write Access for the user. In folder
/home/USER/.config/unity3d/cache/packages/packages.unity.com/
all package folders an files don’t have write access for the USER.
Besides that it is not how .config folder is supposed to used it also has problems since some packages use a file access which is not restricted to read only.
E.g. running: Edit > Render Pipeline > Gnerate Shader Includes
( you might need to install lightweight/high definition pipelines first to make this appear)
yields to:
UnauthorizedAccessException: Access to the path "/home/micha/.config/unity3d/cache/packages/packages.unity.com/com.unity.render-pipelines.high-definition@1.1.2-preview/HDRP/Material/GGXConvolution/GGXConvolution.cs.hlsl" is denied.
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:320)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamWriter.cs:124)
System.IO.StreamWriter..ctor (System.String path, Boolean append)
(wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
System.IO.File.CreateText (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:159)
UnityEditor.Experimental.Rendering.CSharpToHLSL.GenerateAll () (at /home/micha/.config/unity3d/cache/packages/packages.unity.com/com.unity.render-pipelines.core@1.1.2-preview/CoreRP/Editor/ShaderGenerator/CSharpToHLSL.cs:101)
UnityEditor.Experimental.Rendering.ShaderGeneratorMenu.GenerateShaderIncludes () (at /home/micha/.config/unity3d/cache/packages/packages.unity.com/com.unity.render-pipelines.core@1.1.2-preview/CoreRP/Editor/ShaderGenerator/ShaderGeneratorMenu.cs:10)