How do groups work on Linux?
jvns.ca
How do groups work on Linux?
1–10 of 68 posts
Re: How do groups work on Linux?
#2Re: How do groups work on Linux?
#3Re: How do groups work on Linux?
#4Re: How do groups work on Linux?
#5One of the most useful group-related tricks (introduced in BSD Unix, I believe) is the setgid bit on a directory. If this is set, new files and subdirectories created within the directory will have the same group as the directory, rather than the group of the process that created them.
Re: How do groups work on Linux?
#6One of the most useful group-related tricks (introduced in BSD Unix, I believe) is the setgid bit on a directory. If this is set, new files and subdirectories created within the directory will have the same group as the directory, rather than the group of the process that created them.
[dozzie@zorn /srv]$ ls -ld foo
drwxrwxrwx 2 root wheel uarch 2 Nov 21 12:57 foo/
[dozzie@zorn /srv]$ touch foo/nabla
[dozzie@zorn /srv]$ ls -l foo/nabla
-rw-r--r-- 1 dozzie wheel uarch 0 Nov 21 12:58 foo/nabla
[dozzie@zorn /srv]$ id
uid=1001(dozzie) gid=1001(dozzie) groups=1001(dozzie)
[dozzie@zorn /srv]$ uname -s -r
FreeBSD 11.0-RELEASE-p1
This is called "BSD semantics". You can get the same behaviour with
appropriate mount option for Ext2/3/4 and XFS.Re: How do groups work on Linux?
#7One of the most useful group-related tricks (introduced in BSD Unix, I believe) is the setgid bit on a directory. If this is set, new files and subdirectories created within the directory will have the same group as the directory, rather than the group of the process that created them.
[dozzie@zorn /srv]$ ls -ld foo drwxrwxrwx 2 root wheel uarch 2 Nov 21 12:57 foo/ [dozzie@zorn /srv]$ touch foo/nabla [dozzie@zorn /srv]$ ls -l foo/nabla -rw-r--r-- 1 dozzie wheel uarch 0 Nov 21 12:58 foo/nabla [dozzie@zorn /srv]$ id uid=1001(dozzie) gid=1001(dozzie) groups=1001(dozzie) [dozzie@zorn /srv]$ uname -s -r FreeBSD 11.0-RELEASE-p1 This is called "BSD semantics". You can get the same behaviour with appropria…
Re: How do groups work on Linux?
#8One of the most useful group-related tricks (introduced in BSD Unix, I believe) is the setgid bit on a directory. If this is set, new files and subdirectories created within the directory will have the same group as the directory, rather than the group of the process that created them.
[dozzie@zorn /srv]$ ls -ld foo drwxrwxrwx 2 root wheel uarch 2 Nov 21 12:57 foo/ [dozzie@zorn /srv]$ touch foo/nabla [dozzie@zorn /srv]$ ls -l foo/nabla -rw-r--r-- 1 dozzie wheel uarch 0 Nov 21 12:58 foo/nabla [dozzie@zorn /srv]$ id uid=1001(dozzie) gid=1001(dozzie) groups=1001(dozzie) [dozzie@zorn /srv]$ uname -s -r FreeBSD 11.0-RELEASE-p1 This is called "BSD semantics". You can get the same behaviour with appropria…
Re: How do groups work on Linux?
#9EDIT: Seems a Firefox related bug, i noticed this strange behavior with other websites inc. Stack Overflow since then. Will investigate asap.
Re: How do groups work on Linux?
#10Earlier quoted context omitted.
[dozzie@zorn /srv]$ ls -ld foo drwxrwxrwx 2 root wheel uarch 2 Nov 21 12:57 foo/ [dozzie@zorn /srv]$ touch foo/nabla [dozzie@zorn /srv]$ ls -l foo/nabla -rw-r--r-- 1 dozzie wheel uarch 0 Nov 21 12:58 foo/nabla [dozzie@zorn /srv]$ id uid=1001(dozzie) gid=1001(dozzie) groups=1001(dozzie) [dozzie@zorn /srv]$ uname -s -r FreeBSD 11.0-RELEASE-p1 This is called "BSD semantics". You can get the same behaviour with appropria…
What filesystem was that? And why is this behavior filesystem-specific?