FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Tue Nov 24, 2020 08:25



Post new topic Reply to topic  [ 14 posts ] 
Inherit option not working for me 
Author Message

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Inherit option not working for me
I'm sorry if this is a silly beginner's question.
I have a fresh install of Linux Mint 17.1 and I configured the NTFS access to my NFTS disks as follows:

.NTFS-3G\UserMapping
Code:
# Generated by usermap for Windows, v 1.1.5
# For Windows account "jorgk" in domain "SAPO"
# Replace "user" and "group" hereafter by matching Linux login
jorgk::S-1-5-21-3115962461-2576566216-470640567-1000
:jorgk:S-1-5-21-3115962461-2576566216-470640567-513


In /etc/fstab:
Code:
/dev/disk/by-id/xxx /ntfsD ntfs-3g inherit,locale=en_US.UTF-8 0 0


Here are details of a file that was created on Linux:
Attachment:
SecuritySettings.png
SecuritySettings.png [ 6.54 KiB | Viewed 26593 times ]


As we can see, the permissions are not inherited.

So what am I doing wrong?


Thu Jan 22, 2015 19:51
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Inherit option not working for me
Hi,

Quote:
As we can see, the permissions are not inherited.

Yes, and this could be correct if there was nothing to inherit from the parent directory (typically an external disk whose root directory was not created with inheritance information).

Which ntfs-3g version are you using ? A number of fixes related to Windows inheritance were introduced in ntfs-3g-2014.2.15AR.3. To know the ntfs-3g version type :
Code:
ntfs-3g -help

To make a proper check, use Windows for the user jorgk to create a directory in his Windows home directory. Then switch to Linux and have the user jorgk to create a subdirectory of this directory created on Windows.
Then post the permissions of both directories.

Note : Windows inheritance does not play well with Linux rules. You may use it if you mostly use Windows, but you may face difficulties if you mostly use Linux.

Regards

Jean-Pierre


Thu Jan 22, 2015 22:35
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
Thank you for your prompt reply, much appreciated.

First some information I forgot to mention in the initial post:
The file is created with the correct owner, so some of my configuration is working.
Here is a snipped from the syslog regarding ntfs-3g:
Code:
Jan 22 17:37:51 sapo2 ntfs-3g[2757]: Version 2013.1.13AR.1 external FUSE 29
Jan 22 17:37:51 sapo2 ntfs-3g[2757]: Mounted /dev/sdd1 (Read-Write, label "", NTFS 3.1)
Jan 22 17:37:51 sapo2 ntfs-3g[2757]: Cmdline options: rw,inherit,locale=en_US.UTF-8
Jan 22 17:37:51 sapo2 ntfs-3g[2757]: Mount options: rw,allow_other,nonempty,relatime,fsname=/dev/sdd1,blkdev,blksize=4096
Jan 22 17:37:51 sapo2 ntfs-3g[2757]: User mapping built, Posix ACLs in use, configuration type 7


That already answers the question regarding the version. It's the version that comes out of the box with Linux Mint (which I updated fully).

The files I created were created in H:\ (H:\ being the Windows disk, obviously not the Windows boot disk). The files should have inherited from the "H:\ object" as other files created under Windows do.

I will now carry out the test you suggested and post the results here in a short while.


Thu Jan 22, 2015 22:56
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
Folders "Tuxera-Linux" were created in Linux.
Below the results of the test on both C:\ and H:\. Sadly they differ.
For files nothing is inherited.
Attachment:
c-permissions.png
c-permissions.png [ 52.9 KiB | Viewed 26587 times ]

Attachment:
h-permissions.png
h-permissions.png [ 47.26 KiB | Viewed 26587 times ]


So how do I try the 2014 version to see whether it is better?
Kind regards, Jörg.


Thu Jan 22, 2015 23:33
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
I got the 2014 version from https://packages.debian.org/sid/amd64/ntfs-3g/download
I'll see how I go with it.


Fri Jan 23, 2015 00:03
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
The manual installation of the package turned into a nightmare. It started a spiral of more an more packages requiring an update, here are a few of them:
Code:
libgmp10_6.0.0+dfsg-6_amd64.deb
libgnutls-deb0-28_3.3.8-5_amd64.deb
libp11-kit0_0.20.7-1_amd64.deb
libtasn1-6_4.2-2_amd64.deb
p11-kit-modules_0.20.7-1_amd64.deb

libtasn1-6_4.2-2_amd64.deb finally broke the package manager, so I had to force it back to the "official" version.

Conclusion 1: Don't try to install packages by hand if you don't know what you're doing.
Conclusion 2: The 2014 version of ntfs-3g is currently not supported by Ubuntu/Mint.

So is there a way to install it other than compiling it from the source?


Fri Jan 23, 2015 01:12
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Inherit option not working for me
Hi,

So, you are using 2013.1.13AR.1, and you do not benefit from fixes done in 2013.1.13AR.3. If you do not want to compile 2013.1.13AR.3, you can try the Knoppix prelinked version from http://www.tuxera.com/community/ntfs-3g ... /#download which is supposed to be a universal one.

You can make a try without installing anything :
Code:
unzip -x linked-ntfs-3g-2014.2.15AR.3.zip
chmod 755 linked-ntfs-3g
# make sure partition is not initially mounted
sudo umount /ntfsD
sudo linked-ntfs-3g -o inherit /dev/disk/by-id/xxx /ntfsD

If this fails because of a missing library or whatever reason, you will have to compile or wait for the upgrade to reach Mint.

On your tests on "H:", I see that the directory H:\Tuxera was created by an administrator, so Linux has nothing to inherit from it to jorgk. You should use Windows Explorer as user jorgk to create your top directories, from which you can inherit permissions for jorgk.

Be sure to understand that ntfs-3g applies inheritance at the file system level, and it is not an emulator of Windows applications. In particular, Windows Explorer sometimes applies its own inheritance rules (at least when moving files within the same partition, or when the parent directory has special properties). Also note that Windows has several levels of administrators, whereas Linux has a single one, so permissions associated with administrators may not map properly.

When using Windows inheritance on Linux, it is better to always create files as a user in a directory tree whose root was created by Windows Explorer as a plain user.

Regards

Jean-Pierre


Fri Jan 23, 2015 11:43
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
Hello,
thank you for your reply.

First let's clarify a few things.

You meant to say "... and you do not benefit from fixes done in 2014.1.13AR.3."

The H:\Tuxera directory was created by user jorgk, the owner is jorgk and all its permissions are inherited from H:\. As the screenshot shows, H:\Tuxera\Tuxera-Linux has the correct inherited permissions. A file created within the folder sadly doesn't inherit anything.

C:\Users\jorgk\Tuxera was equally created by jorgk. C:\Users\jorgk\Tuxera\Tuxera-Linux has a strange set of inherited and non-inherited permissions. Again, a file created within the folder sadly doesn't inherit anything.

In a short while I will try the precompiled version.

Kind regards, Jörg.


Fri Jan 23, 2015 21:08
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
Hello,

I've run the tests using the linked-ntfs-3g version 2014.2.15AR.3 (oops, I just realised that in my previous post I got the version wrong).

The result is that all folders and documents are created with the correct inherited permissions in all cases, so on C:\ and H:\. Folders as well as documents receive the correct inherited permissions.

Also, they receive the inherited permissions regardless of whether the owning folder is owned by jorgk or by Administrator.

So this works 100% correctly (in the cases I looked at) and I would be very happy to deploy it.

What would be the best way:
    Keep using the linked-ntfs-3g binary.
    Compile it from the source. Doesn't that overwrite the existing version and confuse the package management?
    Switch to Fedora which seems to already have the new version included.
    Get some Debian/Ubuntu package from somewhere. I've already tried but didn't get anywhere.

Any suggestion would be very welcome.

Kind regards, Jörg.


Fri Jan 23, 2015 22:49
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Inherit option not working for me
Hi,
Quote:
So this works 100% correctly (in the cases I looked at)

Good news !
Quote:
they receive the inherited permissions regardless of whether the owning folder is owned by jorgk or by Administrator.

Remember however that there are known cases where inheritance from directories created by Administrator is not satisfactory. This is because there are several administrator levels on Windows, and I do not know how to improve that.
Quote:
What would be the best way:
Keep using the linked-ntfs-3g binary.

That is the easiest if you are uneasy with compiling. To get it to be used through mount (and etc/vfstab), locate your current ntfs-3g (by issuing "which ntfs-3g"), and replace it by a symlink to linked-ntfs-3g.
Quote:
Compile it from the source. Doesn't that overwrite the existing version and confuse the package management?

Also a good way. Remove your current version first through your package manager to avoid any conflict.
Quote:
Switch to Fedora which seems to already have the new version included.

The stock Fedora does not have the recent fixes, but there is an updated package on the ntfs-3g web (this is the one I am using).
Quote:
Get some Debian/Ubuntu package from somewhere. I've already tried but didn't get anywhere.

An update has recently been made available on the Debian Sid. Just make sure it is not the buggy 2014.1.13AR.2.

Regards

Jean-Pierre


Sat Jan 24, 2015 09:38
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
Hi and thank you for your continued support.
I think I will use the most painless option, the linked binary, unless there is an advantage in compiling from source. Is there?
In the meantime I've raised a bug here to see whether the correct packages can be made available:
https://bugs.launchpad.net/linuxmint/+bug/1414275
Kind regards, Jörg.


Sat Jan 24, 2015 11:22
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
I'm still considering my options. What's the difference between
2014.2.15AR.2-1 - packages.debian.org/jessie/ntfs-3g and
2014.2.15AR.3-1 - packages.debian.org/sid/ntfs-3g.
(Sorry, forum only allows one URL).
Not much according to http://metadata.ftp-master.debian.org/changelogs/main/n/ntfs-3g/unstable_changelog.

The 2014.2.15AR.2-1 is available in Debian testing and should therefore be in Mint Debian (rolling release).


Sat Jan 24, 2015 14:43
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Inherit option not working for me
Hi,

Quote:
I'm still considering my options. What's the difference between
2014.2.15AR.2-1 - packages.debian.org/jessie/ntfs-3g and
2014.2.15AR.3-1 - packages.debian.org/sid/ntfs-3g.

2014.2.15AR.2-1 is buggy. Do not use it.

Regards

Jean-Pierre


Sat Jan 24, 2015 17:27
Profile

Joined: Thu Aug 11, 2011 08:59
Posts: 13
Post Re: Inherit option not working for me
On my Linux Mint 17.1 (based on Ubuntu 14.04) I added this repository:
Code:
deb http://ftp.debian.org/debian unstable main contrib non-free

and then did a
Code:
sudo apt-get install ntfs-3g


In the end I got:
Code:
ntfs-3g --help
ntfs-3g 2014.2.15AR.3 integrated FUSE 28 - Third Generation NTFS Driver


Just for the record the dependencies:
Code:
Get:1 http://ftp.debian.org/debian/ unstable/main libgpg-error0 i386 1.17-3 [97,2 kB]
Get:2 http://ftp.debian.org/debian/ unstable/main libgpg-error0 amd64 1.17-3 [94,9 kB]
Get:3 http://ftp.debian.org/debian/ unstable/main libgcrypt20 amd64 1.6.2-4+b1 [390 kB]
Get:4 http://ftp.debian.org/debian/ unstable/main libgmp10 amd64 2:6.0.0+dfsg-6 [253 kB]
Get:5 http://ftp.debian.org/debian/ unstable/main p11-kit-modules amd64 0.20.7-1 [72,9 kB]
Get:6 http://ftp.debian.org/debian/ unstable/main libp11-kit0 i386 0.20.7-1 [83,3 kB]
Get:7 http://ftp.debian.org/debian/ unstable/main libp11-kit0 amd64 0.20.7-1 [81,2 kB]
Get:8 http://ftp.debian.org/debian/ unstable/main libtasn1-6 i386 4.2-2 [50,5 kB]
Get:9 http://ftp.debian.org/debian/ unstable/main libtasn1-6 amd64 4.2-2 [48,6 kB]
Get:10 http://ftp.debian.org/debian/ unstable/main libgnutls-deb0-28 amd64 3.3.8-5 [694 kB]
Get:11 http://ftp.debian.org/debian/ unstable/main ntfs-3g amd64 1:2014.2.15AR.3-1 [489 kB]


Sat Jan 24, 2015 21:29
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 


Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.