FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-03-2010, 03:39 PM
Nikos Chantziaras
 
Default ntfs-3g access rights

On 10/03/2010 05:13 PM, Mick wrote:

Hi All,

On a box which dual boots into MSWindows I mount a ntfs partition using fstab
as follows:

/dev/sda9 /mnt/data ntfs-3g defaults,noatime,locale=en_GB.utf8 0 0

however, when I ls the contents all files and directories are shown as:

(d)rwxrwxrwx

The problem is that these are different to the MSWindows rights and also if I
untar any fs in there then the access rights of that tarred fs are not
retained.

What is an appropriate way to configure this so that the Linux user has the
same access rights as the MSWindows user?

PS. I have set up a UserMapping file, but this has not made any difference.


AFAIK, it's not possible. Windows access rights are totally different
than Unix ones.
 
Old 10-03-2010, 03:58 PM
Mick
 
Default ntfs-3g access rights

On Sunday 03 October 2010 16:39:53 Nikos Chantziaras wrote:
> On 10/03/2010 05:13 PM, Mick wrote:
> > Hi All,
> >
> > On a box which dual boots into MSWindows I mount a ntfs partition using
> > fstab as follows:
> >
> > /dev/sda9 /mnt/data ntfs-3g defaults,noatime,locale=en_GB.utf8
> > 0 0
> >
> > however, when I ls the contents all files and directories are shown as:
> >
> > (d)rwxrwxrwx
> >
> > The problem is that these are different to the MSWindows rights and also
> > if I untar any fs in there then the access rights of that tarred fs are
> > not retained.
> >
> > What is an appropriate way to configure this so that the Linux user has
> > the same access rights as the MSWindows user?
> >
> > PS. I have set up a UserMapping file, but this has not made any
> > difference.
>
> AFAIK, it's not possible. Windows access rights are totally different
> than Unix ones.

:-( OK, thanks.
--
Regards,
Mick
 
Old 10-03-2010, 07:00 PM
Alan McKinnon
 
Default ntfs-3g access rights

Apparently, though unproven, at 17:58 on Sunday 03 October 2010, Mick did
opine thusly:

> On Sunday 03 October 2010 16:39:53 Nikos Chantziaras wrote:
> > On 10/03/2010 05:13 PM, Mick wrote:
> > > Hi All,
> > >
> > > On a box which dual boots into MSWindows I mount a ntfs partition using
> > > fstab as follows:
> > >
> > > /dev/sda9 /mnt/data ntfs-3g defaults,noatime,locale=en_GB.utf8
> > > 0 0
> > >
> > > however, when I ls the contents all files and directories are shown as:
> > >
> > > (d)rwxrwxrwx
> > >
> > > The problem is that these are different to the MSWindows rights and
> > > also if I untar any fs in there then the access rights of that tarred
> > > fs are not retained.
> > >
> > > What is an appropriate way to configure this so that the Linux user has
> > > the same access rights as the MSWindows user?
> > >
> > > PS. I have set up a UserMapping file, but this has not made any
> > > difference.
> >
> > AFAIK, it's not possible. Windows access rights are totally different
> > than Unix ones.
> :
> :-( OK, thanks.

I don't have ntsf-3g installed here, and have no use for it, and can't be
arsed to install it to check :-)

But, it's mount command ought to obey the usual permission model for using
foreign filesystems on Unix, which is:

As the models are so different and can't be mapped one to another sanely,
mount fudges the permissions. Basically, it assigns the same umask and
ownership to every object on the volume. The default is umask=0000,
owner=root:root (actually 0:0), but that's just a default and it can actually
be anything. Look into the docs for such mount options as

uid
gid
umask
fmask
dmask

The last two are from vfat, they just let you use one mask for directories and
another for files (which is quite sane actually - otherwise you get every file
on the volume being executable which is crazy).

Assuming your uid is 1000, primary group 1000, you can then use options
something like:

uid=1000,gid=1000,dmask=0007,fmask=0117

which gives a sane unix-like set of permissions. Nothing close to windows but
a) you don't have to be root to use it and b) the www user can't trash your
files on the ntfs volume.

Like I said, I've never used ntfs-3g but the above is a pretty common
permissions model and it's reasonable to assume ntfs-3g probably implements it
or something similar. As always, read the fine docs and YMMV.


--
alan dot mckinnon at gmail dot com
 
Old 10-03-2010, 07:19 PM
Mick
 
Default ntfs-3g access rights

On Sunday 03 October 2010 20:00:23 Alan McKinnon wrote:
> Apparently, though unproven, at 17:58 on Sunday 03 October 2010, Mick did
>
> opine thusly:
> > On Sunday 03 October 2010 16:39:53 Nikos Chantziaras wrote:
> > > On 10/03/2010 05:13 PM, Mick wrote:
> > > > Hi All,
> > > >
> > > > On a box which dual boots into MSWindows I mount a ntfs partition
> > > > using fstab as follows:
> > > >
> > > > /dev/sda9 /mnt/data ntfs-3g
> > > > defaults,noatime,locale=en_GB.utf8 0 0
> > > >
> > > > however, when I ls the contents all files and directories are shown
> > > > as:
> > > >
> > > > (d)rwxrwxrwx
> > > >
> > > > The problem is that these are different to the MSWindows rights and
> > > > also if I untar any fs in there then the access rights of that tarred
> > > > fs are not retained.
> > > >
> > > > What is an appropriate way to configure this so that the Linux user
> > > > has the same access rights as the MSWindows user?
> > > >
> > > > PS. I have set up a UserMapping file, but this has not made any
> > > > difference.
> > >
> > > AFAIK, it's not possible. Windows access rights are totally different
> > > than Unix ones.
> > :
> > :-( OK, thanks.
>
> I don't have ntsf-3g installed here, and have no use for it, and can't be
> arsed to install it to check :-)
>
> But, it's mount command ought to obey the usual permission model for using
> foreign filesystems on Unix, which is:
>
> As the models are so different and can't be mapped one to another sanely,
> mount fudges the permissions. Basically, it assigns the same umask and
> ownership to every object on the volume. The default is umask=0000,
> owner=root:root (actually 0:0), but that's just a default and it can
> actually be anything. Look into the docs for such mount options as
>
> uid
> gid
> umask
> fmask
> dmask
>
> The last two are from vfat, they just let you use one mask for directories
> and another for files (which is quite sane actually - otherwise you get
> every file on the volume being executable which is crazy).
>
> Assuming your uid is 1000, primary group 1000, you can then use options
> something like:
>
> uid=1000,gid=1000,dmask=0007,fmask=0117
>
> which gives a sane unix-like set of permissions. Nothing close to windows
> but a) you don't have to be root to use it and b) the www user can't trash
> your files on the ntfs volume.
>
> Like I said, I've never used ntfs-3g but the above is a pretty common
> permissions model and it's reasonable to assume ntfs-3g probably implements
> it or something similar. As always, read the fine docs and YMMV.

Thanks Neil, much appreciated. I'll have a play with the dmask, fmask
settings as you suggest and see what gives.
--
Regards,
Mick
 
Old 10-03-2010, 07:48 PM
Nganon
 
Default ntfs-3g access rights

On Sun, Oct 3, 2010 at 10:19 PM, Mick <michaelkintzios@gmail.com> wrote:
>
> On Sunday 03 October 2010 20:00:23 Alan McKinnon wrote:

[..]

> > Assuming your uid is 1000, primary group 1000, you can then use options
> > something like:
> >
> > uid=1000,gid=1000,dmask=0007,fmask=0117
> >
> > which gives a sane unix-like set of permissions. Nothing close to windows
> > but a) you don't have to be root to use it and b) the www user can't trash
> > your files on the ntfs volume.
> >
> > Like I said, I've never used ntfs-3g but the above is a pretty common
> > permissions model and it's reasonable to assume ntfs-3g probably implements
> > it or something similar. As always, read the fine docs and YMMV.
>
> Thanks Neil, much appreciated. *I'll have a play with the dmask, fmask
> settings as you suggest and see what gives.
> --
> Regards,
> Mick

Here it is in action...

Sun Oct 03 | 22:38:57 ~ $ grep ntfs /etc/fstab
#/dev/hda3 /mnt/hda3 ntfs-3g
dmask=007,fmask=117,gid=6,locale=en_US.UTF-8 0 0
Sun Oct 03 | 22:39:11 ~ $ ll /mnt/hda3/
total 461
-rw-rw---- 1 root disk 0 Mar 7 2004 AUTOEXEC.BAT
-rw-rw---- 1 root disk 4952 Aug 4 2004 Bootfont.bin
-rw-rw---- 1 root disk 210 Apr 28 13:54 boot.ini
-rw-rw---- 1 root disk 0 Mar 7 2004 CONFIG.SYS
drwxrwx--- 1 root disk 4096 Feb 20 2010 Documents and Settings
drwxrwx--- 1 root disk 32768 Dec 25 2009 f66ab2f450887cbdbce72b4ac54c5a
-rw-rw---- 1 root disk 0 Mar 7 2004 IO.SYS
drwxrwx--- 1 root disk 4096 Mar 27 2009 MinGW
-rw-rw---- 1 root disk 166 Dec 13 2009 mp4log.txt
-rw-rw---- 1 root disk 0 Mar 7 2004 MSDOS.SYS
drwxrwx--- 1 root disk 0 Mar 29 2010 My Photo
drwxrwx--- 1 root disk 0 Mar 29 2010 My Video
drwxrwx--- 1 root disk 4096 Jul 11 2009 nrn71
-rw-rw---- 1 root disk 47564 Aug 4 2004 NTDETECT.COM
-rw-rw---- 1 root disk 250560 Sep 28 2008 ntldr
drwxrwx--- 1 root disk 28672 Apr 28 13:43 Program Files
drwxrwx--- 1 root disk 4096 Mar 9 2004 pyqt
drwxrwx--- 1 root disk 12288 Dec 7 2009 Python25
drwxrwx--- 1 root disk 4096 Jul 10 2009 Python31
drwxrwx--- 1 root disk 0 Sep 12 2008 Qt
drwxrwx--- 1 root disk 0 Apr 28 13:35 RECYCLER
drwxrwx--- 1 root disk 4096 Jan 7 2010 System Volume Information
drwxrwx--- 1 root disk 61440 Apr 28 13:43 WINDOWS
Sun Oct 03 | 22:39:42 ~ $

..huh! I just noticed, it seems I havent booted the damn thing since
August.. [snigger]

Btw, his name is Alan, not Neil. WB Alan.
 
Old 10-04-2010, 06:26 AM
Mick
 
Default ntfs-3g access rights

On Sunday 03 October 2010 20:48:09 Nganon wrote:
> On Sun, Oct 3, 2010 at 10:19 PM, Mick <michaelkintzios@gmail.com> wrote:
> > On Sunday 03 October 2010 20:00:23 Alan McKinnon wrote:
> [..]
>
> > > Assuming your uid is 1000, primary group 1000, you can then use options
> > > something like:
> > >
> > > uid=1000,gid=1000,dmask=0007,fmask=0117
> > >
> > > which gives a sane unix-like set of permissions. Nothing close to
> > > windows but a) you don't have to be root to use it and b) the www user
> > > can't trash your files on the ntfs volume.
> > >
> > > Like I said, I've never used ntfs-3g but the above is a pretty common
> > > permissions model and it's reasonable to assume ntfs-3g probably
> > > implements it or something similar. As always, read the fine docs and
> > > YMMV.
> >
> > Thanks Neil, much appreciated. I'll have a play with the dmask, fmask
> > settings as you suggest and see what gives.
> > --
> > Regards,
> > Mick
>
> Here it is in action...
>
> Sun Oct 03 | 22:38:57 ~ $ grep ntfs /etc/fstab
> #/dev/hda3 /mnt/hda3 ntfs-3g
> dmask=007,fmask=117,gid=6,locale=en_US.UTF-8 0 0
> Sun Oct 03 | 22:39:11 ~ $ ll /mnt/hda3/
> total 461
> -rw-rw---- 1 root disk 0 Mar 7 2004 AUTOEXEC.BAT
> -rw-rw---- 1 root disk 4952 Aug 4 2004 Bootfont.bin
> -rw-rw---- 1 root disk 210 Apr 28 13:54 boot.ini
> -rw-rw---- 1 root disk 0 Mar 7 2004 CONFIG.SYS
> drwxrwx--- 1 root disk 4096 Feb 20 2010 Documents and Settings
> drwxrwx--- 1 root disk 32768 Dec 25 2009 f66ab2f450887cbdbce72b4ac54c5a
> -rw-rw---- 1 root disk 0 Mar 7 2004 IO.SYS
> drwxrwx--- 1 root disk 4096 Mar 27 2009 MinGW
> -rw-rw---- 1 root disk 166 Dec 13 2009 mp4log.txt
> -rw-rw---- 1 root disk 0 Mar 7 2004 MSDOS.SYS
> drwxrwx--- 1 root disk 0 Mar 29 2010 My Photo
> drwxrwx--- 1 root disk 0 Mar 29 2010 My Video
> drwxrwx--- 1 root disk 4096 Jul 11 2009 nrn71
> -rw-rw---- 1 root disk 47564 Aug 4 2004 NTDETECT.COM
> -rw-rw---- 1 root disk 250560 Sep 28 2008 ntldr
> drwxrwx--- 1 root disk 28672 Apr 28 13:43 Program Files
> drwxrwx--- 1 root disk 4096 Mar 9 2004 pyqt
> drwxrwx--- 1 root disk 12288 Dec 7 2009 Python25
> drwxrwx--- 1 root disk 4096 Jul 10 2009 Python31
> drwxrwx--- 1 root disk 0 Sep 12 2008 Qt
> drwxrwx--- 1 root disk 0 Apr 28 13:35 RECYCLER
> drwxrwx--- 1 root disk 4096 Jan 7 2010 System Volume Information
> drwxrwx--- 1 root disk 61440 Apr 28 13:43 WINDOWS
> Sun Oct 03 | 22:39:42 ~ $
>
> ..huh! I just noticed, it seems I havent booted the damn thing since
> August.. [snigger]
>
> Btw, his name is Alan, not Neil. WB Alan.

Of course Alan! Neil sounds totally different ... Sorry, should have gone to
bed earlier!
--
Regards,
Mick
 
Old 10-04-2010, 01:13 PM
James
 
Default ntfs-3g access rights

Mick <michaelkintzios <at> gmail.com> writes:


> Of course Alan! Neil sounds totally different ...

(old hippies: Crosby, Stills, Nash n Young)

(hacks: Alan, Dale, Mick n Neil)

;-) .....couldn't resist


cheers
 
Old 10-04-2010, 02:11 PM
Dale
 
Default ntfs-3g access rights

James wrote:

Mick<michaelkintzios<at> gmail.com> writes:




Of course Alan! Neil sounds totally different ...


(old hippies: Crosby, Stills, Nash n Young)

(hacks: Alan, Dale, Mick n Neil)

;-) .....couldn't resist


cheers





Correction, old fart, stinky at that. Dale

lol

Dale

:-) :-)
 
Old 10-04-2010, 09:44 PM
Mick
 
Default ntfs-3g access rights

On Monday 04 October 2010 15:11:03 Dale wrote:
> James wrote:
> > Mick<michaelkintzios<at> gmail.com> writes:
> >> Of course Alan! Neil sounds totally different ...
> >
> > (old hippies: Crosby, Stills, Nash n Young)
> >
> > (hacks: Alan, Dale, Mick n Neil)
> >
> > ;-) .....couldn't resist
> >
> >
> > cheers
>
> Correction, old fart, stinky at that. Dale
>
> lol
>
> Dale

he, he, I used to have an old LP somewhere with their first greatest hits
album, perhaps it's still in the attic ...
--
Regards,
Mick
 

Thread Tools




All times are GMT. The time now is 05:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org