You are not logged in.

#1 2016-06-07 16:15:34

archaster
Member
Registered: 2016-06-07
Posts: 3

[Solved] Ntfs-3g silent option not taken into account

Hello,

Until recently I was using Ubuntu 12.04. I migrated to arch some months ago, and there is this issue which I can't get solved whatever I do, and I can't get any working documentation on it. Let me elaborate.

So, basically, the NTFS-3g package has the "silent" option which is supposed to hide chown and chmod errors when used in a NTFS partition.
All I am supposed to do is to add this option when mounting the partition. This is, for instance, what I have in my fstab:

UUID=XXXWHATEVERXXX						/mnt/ntfs	ntfs	defaults,nosuid,silent,fmask=0007,dmask=0007,uid=912,gid=912	0	0

#note: current user is a user of the given gid (912), and errors happen anyway when being root. So there are no user-rights related issues. (see answer below)

This was working (at least when I was on Ubuntu 12.04). However, this does not work in arch.

So, the chmod and chown command will throw an error everytime they are used. Which is really annoying, as, for instance, you cannot build anything using autotools / cmake on that partition. Such tools will try to set rights (even if it is not necessary as all created files have default rights = 770) using chmod and eventually fail.

I found no much documentation on the subject, the only link I've found was this: http://tuxera.com/forum/viewtopic.php?f=2&t=1141 which is old (2009) and their solution doesn't work anyway.
Note that I'm not interested in using (potentially buggy) "advanced ntfs-3g", which is not available in arch reps (or aur) anyways.

So, did any of you face the same issue? Or do you have any suggestions to fix this?

Last edited by archaster (2016-06-07 18:35:10)

Offline

#2 2016-06-07 17:12:45

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [Solved] Ntfs-3g silent option not taken into account

It works for me. There's no error messages when trying to do something to files with chmod and chown. It seems "silent" should be the default so should just work always without having to be set in fstab.

There's an interesting sentence about this in the man page ("man mount.ntfs-3g"). It says this there:

silent

Do  nothing, without returning any error, on chmod and chown operations and on permission checking
errors, when the permissions option is not set and no user mapping file is defined. This option is
on  by default, and when set off (through option no_def_opts) ownership and permissions parameters
have to be set.

About "user mapping", it says this:

usermapping=file-name

Use  file file-name as the user mapping file instead of the default .NTFS-3G/UserMapping. If file-
name defines a full path, the file must be located  on  a  partition  previously  mounted.  If  it
defines a relative path, it is interpreted relative to the root of NTFS partition being mounted.

When a user mapping file is defined, the options uid=, gid=, umask=, fmask=, dmask= and silent are
ignored.

Perhaps something about this is breaking it for you?

Offline

#3 2016-06-07 17:52:30

archaster
Member
Registered: 2016-06-07
Posts: 3

Re: [Solved] Ntfs-3g silent option not taken into account

Hello,
thanks for the reply.

This is really weird.

So, no, I have not set any usermapping option. But maybe, I should remove the uid=, gid=, umask=, fmask=, dmask= options.

But in this case what would be the new permissions on the files in the partition ? hmm ... I'm testing this, and I'll get back to you.

Can you tell me what options do you use when mounting the partition?

Offline

#4 2016-06-07 18:15:18

archaster
Member
Registered: 2016-06-07
Posts: 3

Re: [Solved] Ntfs-3g silent option not taken into account

Hello,

It seems that after all, the issue is related to user rights.
Actually, chmod and chown do work and fail silently (status == 0) when called using root, or using the user with uid = 912

So the issue is that even if the current user (uid = 1000) does belong to the given group (groups 1000 and 912), this is not sufficient for him to call chmod or chown. The files need to be owned by the same user (same uid).

So the solution, is to change the mounting options like this:

UUID=XXXWHATEVERXXX						/mnt/ntfs	ntfs	defaults,nosuid,silent,fmask=0007,dmask=0007,uid=1000,gid=912	0	0

This allows the default user (with uid = 1000) to chmod on the files, while allowing other users belonging to group (gid = 912) to read / execute the files.

However, one issue remains: other users belonging to the group (gid=912) cannot chmod silently. This is not a real issue, but if you have any suggestions on how to fix this, I'm taking it smile.

Thanks.

Last edited by archaster (2016-06-07 18:20:47)

Offline

Board footer

Powered by FluxBB