LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-13-2017, 11:01 AM   #1
aparicio
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Rep: Reputation: Disabled
Slackware 14.2 changes permission when mounting NTFS partition


Dear all,


I am not an expert but a normal, regular user of Slackware for the last 16 years.

This time I could not find a way to solve the problem by myself

Sorry if the question is simple.
I have seen problems like this in the past but nothing mentioned in the case of 14.2 specifically.

I have an external HD (NTFS) and 2 PCs (one with 14.1 and the new one with a fresh 14.2, with patches and multilib installed).
I got the following when mounting the HD (both auto/xfce and manually):



Permissions when mounting in Slackware 14.1:
drwx------

Permissions when mounting in Slackware 14.2:
drwxrwxrwx


In version 14.2, too many permissions are given to all of the directories and files in the disk.
I would like to keep permissions as they were in previous version 14.1.


It may be a change with the command mount itself?

Slackware 14.1
mount from util-linux 2.21.2 (with libblkid support)

Slackware 14.2
mount from util-linux 2.27.1 (libmount 2.27.0: assert, debug)

If so, is it possible to recompile mount to suport ``right'' permissions for NTFS?
Permissions works as expected with ext4 partitions.

Please, any help would be appreciated.

Thank you very much in advance.

Ricardo
 
Old 04-14-2017, 09:34 AM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
According to this man page for ntfs-3g the default for permissions is "everybody has full read, write, execution and directory browsing permissions." So, based on that, it seems the mounting in 14.1 is not following the standard. But I haven't used NTFS drives in Linux for a few years, so my information is a bit rusty.

However, you should be able to override the permissions by passing a umask to the mount options. umask=0077 would make all files and folders unaccessible to anyone but the owner.
 
2 members found this post helpful.
Old 04-15-2017, 05:01 PM   #3
aparicio
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
According to this man page for ntfs-3g the default for permissions is "everybody has full read, write, execution and directory browsing permissions." So, based on that, it seems the mounting in 14.1 is not following the standard. But I haven't used NTFS drives in Linux for a few years, so my information is a bit rusty.

However, you should be able to override the permissions by passing a umask to the mount options. umask=0077 would make all files and folders unaccessible to anyone but the owner.

Bassmadrigal,

thank your for answering.

Based on your suggestion, the problem was solved (I have used this command line):
mount -t ntfs-3g -o fmask=133,dmask=022,gid=users,uid=1000 /dev/sdb1 /mnt/disk1/

I am trying now to understand what can be done in the case of automount.
I could not find a configuration file with mounting options.

After many hours, I found this thread but it did not came up to a solution (/etc/fstab does not seem to be used by automount):
http://www.linuxquestions.org/questi...-a-4175498579/

If you have anything else you think might help in this case, please let me know.

Thank you very much for your time.

Best wishes.
 
Old 04-15-2017, 05:29 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
I'm pretty sure this is going to require you to create a udev rule, but I am not nearly competent enough to do it without a ton of research (which, unfortunately, I just don't have that kind of time available right now).

I know you can specify filesystem types in a rule using ENV{ID_FS_TYPE}=="ntfs", but I am not sure how to ensure it is mounted using automount when it detects a usb device plugged in with that matches that rule.

In some quick searching, I did come across these two pages, but I don't have time to really dig into them to see what is needed and what should be ignored. Hopefully you can do some sleuthing and come up with something based on these little breadcrumbs I gave you.

https://bbs.archlinux.org/viewtopic.php?id=142475
https://wiki.archlinux.org/index.php/udisks
 
Old 04-15-2017, 07:03 PM   #5
aparicio
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Default mounting parameters have changed since 14.1, indeed.
As another example I found, a same FAT32 pendrive mounts differently (also different from NTFS).

Code:
$ more /etc/mtab

14.1
/dev/sdc1 /run/media/aparicio/00FF-85F1 vfat rw,nosuid,nodev,uid=1000,gid=100,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2 0 0

14.2
/dev/sdc1 /run/media/aparicio/00FF-85F1 vfat rw,nodev,nosuid,uid=1000,gid=100,shortname=mixed,utf8=1,showexec,flush,uhelper=udisks2 0 0
It is very difficult for me to figure out the right way to go as it seems there are many pieces of software which makes automount to work, including thunar, udisks2, gnome gvfs, etc.

Thank you for your indication that an udev rule may be a possibility.

Best regards.
 
Old 04-15-2017, 08:05 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Slackware did change from udev to eudev between 14.1 and 14.2, so that could be where the difference is coming from.
 
Old 04-18-2017, 07:32 AM   #7
aparicio
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Slackware did change from udev to eudev between 14.1 and 14.2, so that could be where the difference is coming from.
Thank you very much for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mounting a folder in NTFS Partition with ntfs-3g imayneed Linux - Newbie 5 07-13-2012 09:42 PM
NTFS-3g isn't mounting my NTFS partition... Necronomicom Slackware 4 03-02-2007 03:04 PM
mounting ntfs partitions `permission denied` ??? olcy Slackware 2 02-21-2006 05:59 PM
slackware 9.1 mounting problems (cd drive, cd writer drive, win partition (ntfs)) mr.gizm0 Slackware 8 05-11-2004 06:23 PM
ntfs partition permission problem pdb1013 Linux - Newbie 4 07-21-2003 11:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration