in JetBrains.Profiler.SelfApi/src/Impl/Unix/UnixHelper.cs [10:17]
internal static void UnixChMod([NotNull] string path, UnixFileModes mode)
{
if (!Path.IsPathRooted(path))
throw new ArgumentException(nameof(path));
var rc = LibC.chmod(path, mode);
if (rc != 0)
throw new Exception("chmod() was failed with errno " + Marshal.GetLastWin32Error());
}