linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Proposal for unused permission bit: inherit parent's permissions
@ 2017-11-26 17:11 Narcis Garcia
  0 siblings, 0 replies; only message in thread
From: Narcis Garcia @ 2017-11-26 17:11 UTC (permalink / raw)
  To: linux-fsdevel

[First, sorry for my unexperienced english]

There are 3 bits used for setuid, setgid, sticky; and only 2 of those
bits have some effect for directories: GUID and Sticky. (not UID)

My proposal is to dedicate the unused bit on directories (that one files
use for setuid), currently set with:
$ chmod u+s MyFolder

...to use for a complementary task to current GUID
[$ chmod g+s MyFolder]

This GUID bit has the effect to new elements inherit parent's group.
The currently unused bit could have the effect to new elements inherit
paren'ts permissions.

What the permissions inheritance will be useful for?
Shared directories (through network, locally, and portable in an USB stick).

Ext2/3/4 and other Linux native filesystems should be useful to easily
share contents, and it's not so easy for common people:

== EXAMPLE ==

User A (uid=1000,gid=1000,umask=0002) in computer 1 formats an USB stick
with Ext4.
This same person creates directories and files in it and, to "sure" a
friend reads and shares without caring about permissions, does:
$ cd /media/MyStick
$ chown -R root:users .
$ chmod -R a+rwX .
$ find . -type d -exec chmod ug+s {} \;

User B (uid=1003,gid=1004,umask=0027) in computer 2 (with same operating
system) takes friend's USB stick, reads perfectly all directories and
files, and creates a new file in there.
It's nice that with current bits the new file will be for group "users",
but THE PROBLEM is that it's an incomplete inheritance to have big
possibilities that friends (in this example) can read/write this file.

BETTER SOLUTION THAN CURRENT BEHAVIOR: An inheritance that affects
permissions.
Concrete proposal again: That with this current syntax:
$ chmod u+s MyFolder
A bit is already set, but operating system becomes to apply with the
effect of new elements inherit parent's permissions (r,w,s).

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-26 17:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-26 17:11 Proposal for unused permission bit: inherit parent's permissions Narcis Garcia

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).