Proposal for unused permission bit: inherit parent's permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux