From 474505d704e003a0acac0b41f59c7c2e820edaa7 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 23 Mar 2015 09:05:05 +0100 Subject: Linux: solve mount point permission issues for some users where the non-FAT volumes were only mounted in read-only mode --- src/Core/Unix/CoreUnix.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/Core') diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp index 0625ed6b..57513ded 100755 --- a/src/Core/Unix/CoreUnix.cpp +++ b/src/Core/Unix/CoreUnix.cpp @@ -551,6 +551,23 @@ namespace VeraCrypt remove (mountPoint.c_str()); throw; } + +#ifndef TC_MACOSX + // set again correct ownership of the mount point to avoid any issues + if (!options.NoFilesystem && options.MountPoint) + { + mountPoint = *options.MountPoint; + + if (mountPoint.find (GetDefaultMountPointPrefix()) == 0) + { + try + { + chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId()); + } catch (...) { } + } + } +#endif + } catch (...) { -- cgit v1.2.3