Skip to content

Commit

Permalink
SNOW-990111: Modify check to allow permissions without user write
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-lf committed Jan 26, 2024
1 parent 9f2c874 commit 16335ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void TestThatThrowsErrorWhenLogPathIsNotSetAndHomeDirectoryThrowsAnExcept
}

[Test]
public void TestThatDoesNotFailWhenDirectoryPermissionIsNot700()
public void TestThatDoesNotFailWhenDirectoryPermissionIsNot600Or700()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Expand Down
3 changes: 2 additions & 1 deletion Snowflake.Data/Core/Session/EasyLoggingStarter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ private void CheckDirPermissionsOnlyAllowUser(string dirPath)

_unixOperations.SetDirInfo(dirPath);
var dirPermissions = _unixOperations.GetDirPermissions();
if (dirPermissions != FileAccessPermissions.UserReadWriteExecute)
if (dirPermissions != FileAccessPermissions.UserReadWriteExecute &&
dirPermissions != (FileAccessPermissions.UserRead | FileAccessPermissions.UserExecute))
{
s_logger.Warn($"Access permission for the logs directory is currently " +
$"{UnixFilePermissionsConverter.ConvertFileAccessPermissionsToInt(dirPermissions)}");
Expand Down

0 comments on commit 16335ab

Please sign in to comment.