1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Linux: solve mount point permission issues for some users where the non-FAT volumes were only mounted in read-only mode

This commit is contained in:
Mounir IDRASSI
2015-03-23 09:05:05 +01:00
parent d3db2548b5
commit 474505d704

View File

@@ -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 (...)
{