LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 10-20-2012, 02:43 PM   #1
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS, Mageia, Debian, Fedora, openSUSE, Ubuntu
Posts: 228

Rep: Reputation: Disabled
NTFS-3g - using NTFS permissions


Can anyone help me with mounting an NTFS permissions so that Linux users can use the native NTFS permissions.

I am mounting this using fstab options:
fstab: 'auto,users,permissions'
but this just leaves it as owner=root, group=root and all read-only.

Have I misunderstood the 'permissions' option or is there something else I need to do to get this working.

Thanks,
Nick
 
Old 10-20-2012, 03:06 PM   #2
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,139

Rep: Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622
Do you have ntfs-3g installed? You also need to change the group to "users" to allow non-root users access.
 
Old 10-20-2012, 03:19 PM   #3
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS, Mageia, Debian, Fedora, openSUSE, Ubuntu
Posts: 228

Original Poster
Rep: Reputation: Disabled
Yes ntfs-3g installed from epel repository. Guess I can add 'gid=users' to change the permissions, will try that. However I understood the 'permissions' option should have picked-up the NTFS permissions automatically somehow.
 
Old 10-20-2012, 03:43 PM   #4
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 310

Rep: Reputation: 59
Maybe this will help
Code:
"fmask=177,dmask=077" "Root has read/write access, users have no access (ntfs-3g)"
"fmask=333,dmask=222" "Everyone has read only access (built-in kernel ntfs driver)"
"fmask=133,dmask=022" "Everyone has read access, but only root can write (ntfs-3g)"
"fmask=111,dmask=000" "All users can read/write to any file (ntfs-3g)"
example
Code:
/dev/sd?        /windows           ntfs-3g  fmask=111,dmask=000  1   0

Last edited by Nikosis; 10-20-2012 at 03:50 PM.
 
2 members found this post helpful.
Old 10-20-2012, 04:16 PM   #5
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS, Mageia, Debian, Fedora, openSUSE, Ubuntu
Posts: 228

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Nikosis View Post
Maybe this will help
Code:
"fmask=177,dmask=077" "Root has read/write access, users have no access (ntfs-3g)"
"fmask=333,dmask=222" "Everyone has read only access (built-in kernel ntfs driver)"
"fmask=133,dmask=022" "Everyone has read access, but only root can write (ntfs-3g)"
"fmask=111,dmask=000" "All users can read/write to any file (ntfs-3g)"
Well yes that would work but it gives everything on the partition the same permissions. What I was hoping for was a way to map NTFS permissions to Linux.

Lets say I have a windows user 'Nick' and a Linux user 'Nick', I want the same permissions to apply to the ntfs-3g share as the original NTFS partition. So if 'Nick' has full permissions to a particular directory on NTFS then the same should apply when accessing it through ntfs-3g. Or is that sort of mapping not yet possible with ntfs-3g?
 
Old 10-21-2012, 03:13 AM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 12,094

Rep: Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583Reputation: 1583
Quote:
so that Linux users can use the native NTFS permissions.
there are NO NTFS permissions
the format dose not support it
Quote:
I want the same permissions to apply to the ntfs-3g share as the original NTFS partition.
NTFS dose not use permissions

there is a mask used when reading and writing to a Microsoft NTFS partition to simulate the LINUX permissions

normally a NTFS partition is AUTO mounted with read only for normal users
and read/write for ROOT ONLY

the "ntfs-3g" kernel mod is the code to read/write TO the proprietary NTFS format
it was reverse endangered to give RW access to the NON free NTFS format
 
2 members found this post helpful.
Old 10-21-2012, 10:58 PM   #7
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 310

Rep: Reputation: 59
Quote:
Originally Posted by John VV View Post
there are NO NTFS permissions
the format dose not support it

NTFS dose not use permissions
A little too general, NTFS does support permissions and use it, just not the same way as Linux fs
Quote:
...there is a mask used when reading and writing to a Microsoft NTFS partition to simulate the LINUX permissions

normally a NTFS partition is AUTO mounted with read only for normal users
and read/write for ROOT ONLY

the "ntfs-3g" kernel mod is the code to read/write TO the proprietary NTFS format
it was reverse endangered to give RW access to the NON free NTFS format
I believe you can do more than that. It is kind of what you might need by using ntfs-3g.usermap or ntfs-3g -o permissions
You can read more about it in ntfs-3g man pages or here or here or here

Last edited by Nikosis; 10-21-2012 at 11:01 PM.
 
Old 10-22-2012, 11:14 AM   #8
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS, Mageia, Debian, Fedora, openSUSE, Ubuntu
Posts: 228

Original Poster
Rep: Reputation: Disabled
Yes Nikosis, that UserMapping is exactly what I am looking for. However still doesn't provide quite enough info to get it working. What do I put in the fstab options if I want to use User Mapping? Do I need to create a UserMapping file or does ntfs-3g do that automatically?

What would be good but I can't find would be a step-by-step example of how to set-up ntfs-3g using User Mapping.

Nick
 
Old 10-23-2012, 02:28 AM   #9
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 310

Rep: Reputation: 59
First thing you have to do is unmount windows/ntfs partition , than run this command as root
Code:
ntfs.3g.usermap /dev/your_ntfs_partition
Some files will have unknown ownership, so it will ask you a question
Quote:
file "Readme" has no mapped owner/group
By which Linux login should this file be owned ?
Enter gid of login, or just press "enter" if this file
does not belong to a user, or you do not know to whom
User/Group:
It will create a file UserMapping, move that file to wherever you like, and give it read-only permissions
fstab
Code:
...
/dev/xxx    /mnt/point    ntfs-3g    usermapping=/path_to_file/UserMapping  1  0
...
Also, you might want to create a new groups, because everyone belong to group "users"

Last edited by Nikosis; 10-23-2012 at 02:38 AM. Reason: typo
 
Old 10-24-2012, 07:52 AM   #10
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS, Mageia, Debian, Fedora, openSUSE, Ubuntu
Posts: 228

Original Poster
Rep: Reputation: Disabled
Has anyone else actually got NTFS-3g UserMapping working?

First problem I have is with identifying Windows SIDs for the various user and group accounts. Running usermapping.exe from Windows simply doesn't seem to scann the whole drive. For example I have created a directory on NTFS containg four deliberately named sub-directories with two owned by the relevent users and the other two owned by relevent groups. UserMapping doesn't seem to scan all of these correctly. Running it from Linux isn't al lot of help either.

This raises the question of whether files can be owned by a group or do they have to be owned by an actual user?

I have now got this sort of working with a user as owner but does not seem to work with a group as owner. Also it appears as if 'Others' have 'Folder access: Create and Delete files'. ls -l indicates permissions of drwxrwxrwx. Ah hang on dows UserMapping apply only to the Owner, not to other NTFS permissions?
 
Old 10-24-2012, 10:33 AM   #11
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS, Mageia, Debian, Fedora, openSUSE, Ubuntu
Posts: 228

Original Poster
Rep: Reputation: Disabled
Further testing suggests that setting a group does not work but setting an individual user does. Anyone have any different experiences to that.

Nick
 
  


Reply

Tags
ntfs3g


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTFS Permissions. YellowSnowIsBad Linux - Newbie 2 11-05-2010 03:10 PM
NTFS Permissions xrugger70 Suse/Novell 1 07-06-2006 11:43 PM
NTFS and permissions digitolx Linux - Software 2 05-22-2006 11:03 PM
NTFS Permissions DirtyDan Linux - Networking 11 09-11-2005 09:03 PM
ntfs permissions Palamides Slackware 6 02-23-2005 07:42 PM


All times are GMT -5. The time now is 02:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration