From: "Ihar `Philips` Filipau" <thephilips@gmail.com>
To: linux-fsdevel@vger.kernel.org
Subject: mount option to ignore permissions
Date: Thu, 8 Mar 2007 23:39:26 +0100 [thread overview]
Message-ID: <efa6f5910703081439w6f6e02f9vc1d391047f777306@mail.gmail.com> (raw)
Hi!
[ Please CC: me, I'm not subscribed. Yet. ]
The problem have beaten me before. And now I have it again.
Imaging external hard drive with "proper" file system (proper ==
supports posix permissions) where files were created by user A and
then it (ext. hard drive) was brought to another location/computer and
user B tried to read them. Failure. Why? Because Linux preserved
permissions on hard drive - though they are already irrelevant on
system fs is currently mounted on. And that renders literally all
files accessible only by root.
What is needed is special mount option to tell file system (*):
(1) to ignore permissions when file/directory is read;
(2) when file/directory is created it receives automatically "world
writable" permissions 0666 (I cannot imaging how to simulate "user
friendly" file attribute "read-only", though it seems not relevant to
external storage anyway).
I'm looking into the code and it seems that every file system parses
option on their own.
Global flags (ro/rw, nodev, etc) are handled by mount(8) itself and
passed to sys_mount() as bitmask.
How gid/uid are passed to file system? I do not see them in
parameter list to sys_mount(). Or they are handled somehow otherwise?
Any ideas on how I can simulate such behavior and or on how to
implement such attribute would be appreciated.
P.S. chmod/chown isn't option since (1) they do not work for ro file
system and (2) doing that every time on NNNk files might quite
tiresome - every time disk is reattached.
P.P.S. BTW MacOSX has such option and it is automatically selected for
external hard drives.
P.P.P.S. That doesn't happen with most external hard drives since they
are all FAT32. I moved to ext2/hfs+ in part to avoid the recurring
nightmares of past when I have worked with FAT32 all day long. And
also ext2/hfs+ (under Linux/MacOSX) are better than FAT*. And also I
need "case sensitiveness".
--
Don't walk behind me, I may not lead.
Don't walk in front of me, I may not follow.
Just walk beside me and be my friend.
-- Albert Camus (attributed to)
next reply other threads:[~2007-03-08 22:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 22:39 Ihar `Philips` Filipau [this message]
2007-03-09 15:57 ` mount option to ignore permissions Dave Kleikamp
2007-03-09 16:04 ` Shaya Potter
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=efa6f5910703081439w6f6e02f9vc1d391047f777306@mail.gmail.com \
--to=thephilips@gmail.com \
--cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).