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:
@@ -551,6 +551,23 @@ namespace VeraCrypt
|
|||||||
remove (mountPoint.c_str());
|
remove (mountPoint.c_str());
|
||||||
throw;
|
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 (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user