From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1P2To3-0008QM-Dc for garchives@archives.gentoo.org; Sun, 03 Oct 2010 19:01:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55036E05EF; Sun, 3 Oct 2010 18:59:59 +0000 (UTC) Received: from mail-ew0-f53.google.com (mail-ew0-f53.google.com [209.85.215.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 14A41E05EF for ; Sun, 3 Oct 2010 18:59:58 +0000 (UTC) Received: by ewy3 with SMTP id 3so2152250ewy.40 for ; Sun, 03 Oct 2010 11:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=d50pz9dLD8xi/4+M98Zl9YhSNg48kEAQefRk1BdHz80=; b=IIOdtbDOT6f8+ykFaZQ7F+JaZIesWtvQBnc1DfcMLRjYSMzYi7YJwLYVn51P5fNZd9 MAqA/zC/ye7k2ya0Uv5qbVjNTpa+GNsZTqIxfLMX8mgNw2+MDsPecXfZJYc7u2oYn/zQ 1cYJj4zfmdQTY90rAtgSzvsVXZFH57JZ6TZpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=CoIgepQNaOGQIJa0n7lHa0Dy4x75bdN84frea7qR3cdRorkJ0QdvrVi0Cz0ER6ZLi6 ogGoALfJzyQ2fGjKYkNoqYBDNAgjZHMA8cgz/FYkweC1cL+b8V2PNB2yKITqTTR7HSpp DSf02IBxlpXp0If/KyOnXQjU1HfRFRgvcYNkA= Received: by 10.213.13.2 with SMTP id z2mr6164330ebz.96.1286132398428; Sun, 03 Oct 2010 11:59:58 -0700 (PDT) Received: from nazgul.localnet (196-210-153-155.dynamic.isadsl.co.za [196.210.153.155]) by mx.google.com with ESMTPS id a48sm5793610eei.13.2010.10.03.11.59.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 03 Oct 2010 11:59:56 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: ntfs-3g access rights Date: Sun, 3 Oct 2010 21:00:23 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.35-ck-r2; KDE/4.5.1; x86_64; ; ) References: <201010031513.55706.michaelkintzios@gmail.com> <201010031658.18193.michaelkintzios@gmail.com> In-Reply-To: <201010031658.18193.michaelkintzios@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010032100.24231.alan.mckinnon@gmail.com> X-Archives-Salt: 85a593ae-66a2-4cd9-842d-bde3b806841c X-Archives-Hash: f4e99acbba7b1a9fb9b43d319292c238 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