From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: ntfs-3g access rights
Date: Sun, 3 Oct 2010 21:00:23 +0200 [thread overview]
Message-ID: <201010032100.24231.alan.mckinnon@gmail.com> (raw)
In-Reply-To: <201010031658.18193.michaelkintzios@gmail.com>
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
next prev parent reply other threads:[~2010-10-03 19:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-03 14:13 [gentoo-user] ntfs-3g access rights Mick
2010-10-03 15:39 ` [gentoo-user] " Nikos Chantziaras
2010-10-03 15:58 ` Mick
2010-10-03 19:00 ` Alan McKinnon [this message]
2010-10-03 19:19 ` Mick
2010-10-03 19:48 ` Nganon
2010-10-04 6:26 ` Mick
2010-10-04 13:13 ` James
2010-10-04 14:11 ` Dale
2010-10-04 21:44 ` Mick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201010032100.24231.alan.mckinnon@gmail.com \
--to=alan.mckinnon@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox