fix permissions so user can write mounted volumes on linux
authorabner doubleday <wsmith@abners-MacBook-Air.local>
Mon, 14 Nov 2016 02:26:48 +0000 (21:26 -0500)
committerabner doubleday <wsmith@abners-MacBook-Air.local>
Mon, 14 Nov 2016 02:26:48 +0000 (21:26 -0500)
Core/Unix/CoreUnix.cpp

index 9d7f50d..64d7523 100644 (file)
@@ -550,6 +550,23 @@ namespace nemesis
                                        remove (mountPoint.c_str());
                                throw;
                        }
                                        remove (mountPoint.c_str());
                                throw;
                        }
+
+#ifdef TC_LINUX                        
+                       // set again correct ownership of the mount point to avoid any issues
+                       // thanks to veracrypt for this useful bit
+                       if (!options.NoFilesystem && options.MountPoint)
+                       {
+                               mountPoint = *options.MountPoint;
+
+                               if (mountPoint.find (GetDefaultMountPointPrefix()) == 0)
+                               {
+                                       try
+                                       {
+                                               chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId());
+                                       } catch (...) { }
+                               }
+                       }
+#endif
                }
                catch (...)
                {
                }
                catch (...)
                {
This page took 0.023479 seconds and 4 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.