What does it mean for a folder to have suid permission?SUID has no effect on directories with Linuxsuid-root doesn't have effectWhat does GID mean?Does the suid bit have any meaning for device files?What does “0” mean in the owner and group permission lists of a file/folder?What does a dot after the file permission bits mean?Permission bit of 730 for a directory? what does this mean?Alternatives to suid, for script and interpreted languagesLogrotate “permission denied” error
Is the Microsoft recommendation to use C# properties applicable to game development?
What was the intention with the Commodore 128?
Can anybody tell me who this Pokemon is?
What does 〇〇〇〇 mean when combined with おじさん?
What should we do with manuals from the 80s?
Did Michelle Obama have a staff of 23; and Melania have a staff of 4?
6502: is BCD *fundamentally* the same performance as non-BCD?
Duplicate and slide edge (rip from boundary)
What should I do with the stock I own if I anticipate there will be a recession?
A+ rating still unsecure by Google Chrome's opinion
Does the Haste spell's hasted action allow you to make multiple unarmed strikes? Or none at all?
Why does auto deduce this variable as double and not float?
Build a mob of suspiciously happy lenny faces ( ͡° ͜ʖ ͡°)
Visa on arrival to exit airport in Russia
Are there any cons in using rounded corners for bar graphs?
What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?
Understanding a part of the proof that sequence that converges to square root of two is decreasing.
Minimum population for language survival
Is this bar slide trick shown on Cheers real or a visual effect?
Why do we use low resistance cables to minimize power losses?
How to gracefully leave a company you helped start?
What are these panels underneath the wing root of a A380?
Quick destruction of a helium filled airship?
Short comic about alien explorers visiting an abandoned world with giant statues that turn out to be alive but move very slowly
What does it mean for a folder to have suid permission?
SUID has no effect on directories with Linuxsuid-root doesn't have effectWhat does GID mean?Does the suid bit have any meaning for device files?What does “0” mean in the owner and group permission lists of a file/folder?What does a dot after the file permission bits mean?Permission bit of 730 for a directory? what does this mean?Alternatives to suid, for script and interpreted languagesLogrotate “permission denied” error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I know what it means for a file to have suid permission. It means when other users have execute permission for it, they execute as the owner of the file. But what does it imply when a folder has suid permission? I did some testing and it seems nothing special for the folder. Could anyone help to plain a little? Thanks.
I'm using Oracle Linux 7.6.
root:[~]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
root:[~]#
Below is my testing on a freshly installed server.
root:[~]# pwd
/root
root:[~]# ls -lad /root
dr-xr-x---. 9 root root 4096 Aug 16 22:07 /root
root:[~]# mkdir test
root:[~]# ls -lad test
drwxr-xr-x. 2 root root 4096 Aug 16 22:07 test
root:[~]#
root:[~]# useradd a
root:[~]# passwd a
Changing password for user a.
New password:
BAD PASSWORD: The password is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
root:[~]# chmod u+s test
root:[~]#
root:[~]# su - a
[a@localhost ~]$ cd /root/test
-bash: cd: /root/test: Permission denied
[a@localhost ~]$ cd /root
-bash: cd: /root: Permission denied
[a@localhost ~]$ logout
root:[~]#
root:[~]# ls -lad /root
dr-xr-x---. 10 root root 4096 Aug 16 22:07 /root
root:[~]# chmod o+x /root
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:08:54 CST 2019 on pts/0
[a@localhost ~]$ cd /root/test
[a@localhost test]$
[a@localhost test]$ pwd
/root/test
[a@localhost test]$ ls -la .
total 8
drwsr-xr-x. 2 root root 4096 Aug 16 22:07 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
[a@localhost test]$ touch file1
touch: cannot touch ‘file1’: Permission denied
[a@localhost test]$ logout
root:[~]#
root:[~]# chmod o+w test/
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:09:31 CST 2019 on pts/0
[a@localhost ~]$
[a@localhost ~]$ cd /root/test
[a@localhost test]$ touch file1
[a@localhost test]$ ls -la
total 8
drwsr-xrwx. 2 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
[a@localhost test]$ mkdir folder1
[a@localhost test]$ ls -la
total 12
drwsr-xrwx. 3 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
drwxrwxr-x. 2 a a 4096 Aug 16 22:11 folder1
[a@localhost test]$
As you can see, it seems the files and folders the user a created in /root/test didn't inherit the owner and group of it. The owner and group is a and not root. Are there any problems with my testing? I'm new in Linux.
permissions suid
add a comment |
I know what it means for a file to have suid permission. It means when other users have execute permission for it, they execute as the owner of the file. But what does it imply when a folder has suid permission? I did some testing and it seems nothing special for the folder. Could anyone help to plain a little? Thanks.
I'm using Oracle Linux 7.6.
root:[~]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
root:[~]#
Below is my testing on a freshly installed server.
root:[~]# pwd
/root
root:[~]# ls -lad /root
dr-xr-x---. 9 root root 4096 Aug 16 22:07 /root
root:[~]# mkdir test
root:[~]# ls -lad test
drwxr-xr-x. 2 root root 4096 Aug 16 22:07 test
root:[~]#
root:[~]# useradd a
root:[~]# passwd a
Changing password for user a.
New password:
BAD PASSWORD: The password is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
root:[~]# chmod u+s test
root:[~]#
root:[~]# su - a
[a@localhost ~]$ cd /root/test
-bash: cd: /root/test: Permission denied
[a@localhost ~]$ cd /root
-bash: cd: /root: Permission denied
[a@localhost ~]$ logout
root:[~]#
root:[~]# ls -lad /root
dr-xr-x---. 10 root root 4096 Aug 16 22:07 /root
root:[~]# chmod o+x /root
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:08:54 CST 2019 on pts/0
[a@localhost ~]$ cd /root/test
[a@localhost test]$
[a@localhost test]$ pwd
/root/test
[a@localhost test]$ ls -la .
total 8
drwsr-xr-x. 2 root root 4096 Aug 16 22:07 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
[a@localhost test]$ touch file1
touch: cannot touch ‘file1’: Permission denied
[a@localhost test]$ logout
root:[~]#
root:[~]# chmod o+w test/
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:09:31 CST 2019 on pts/0
[a@localhost ~]$
[a@localhost ~]$ cd /root/test
[a@localhost test]$ touch file1
[a@localhost test]$ ls -la
total 8
drwsr-xrwx. 2 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
[a@localhost test]$ mkdir folder1
[a@localhost test]$ ls -la
total 12
drwsr-xrwx. 3 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
drwxrwxr-x. 2 a a 4096 Aug 16 22:11 folder1
[a@localhost test]$
As you can see, it seems the files and folders the user a created in /root/test didn't inherit the owner and group of it. The owner and group is a and not root. Are there any problems with my testing? I'm new in Linux.
permissions suid
3
Possible duplicate of SUID has no effect on directories with Linux
– muru
8 hours ago
Oh yes, thank you. Does this apply to all Linux distribution like Ubuntu? What is the distribution that @m242 mentioned in his answer? It seems that Linux does use suid for directories.
– Just a learner
8 hours ago
2
It applies to all Linux distributions, because this is how the Linux kernel is.
– muru
8 hours ago
There is a lot of history about these flags - worth reading around the whole subject if you want to lean more about all the different approaches for this. https://en.wikipedia.org/wiki/Chmod
– MoopyGlue
7 hours ago
add a comment |
I know what it means for a file to have suid permission. It means when other users have execute permission for it, they execute as the owner of the file. But what does it imply when a folder has suid permission? I did some testing and it seems nothing special for the folder. Could anyone help to plain a little? Thanks.
I'm using Oracle Linux 7.6.
root:[~]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
root:[~]#
Below is my testing on a freshly installed server.
root:[~]# pwd
/root
root:[~]# ls -lad /root
dr-xr-x---. 9 root root 4096 Aug 16 22:07 /root
root:[~]# mkdir test
root:[~]# ls -lad test
drwxr-xr-x. 2 root root 4096 Aug 16 22:07 test
root:[~]#
root:[~]# useradd a
root:[~]# passwd a
Changing password for user a.
New password:
BAD PASSWORD: The password is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
root:[~]# chmod u+s test
root:[~]#
root:[~]# su - a
[a@localhost ~]$ cd /root/test
-bash: cd: /root/test: Permission denied
[a@localhost ~]$ cd /root
-bash: cd: /root: Permission denied
[a@localhost ~]$ logout
root:[~]#
root:[~]# ls -lad /root
dr-xr-x---. 10 root root 4096 Aug 16 22:07 /root
root:[~]# chmod o+x /root
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:08:54 CST 2019 on pts/0
[a@localhost ~]$ cd /root/test
[a@localhost test]$
[a@localhost test]$ pwd
/root/test
[a@localhost test]$ ls -la .
total 8
drwsr-xr-x. 2 root root 4096 Aug 16 22:07 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
[a@localhost test]$ touch file1
touch: cannot touch ‘file1’: Permission denied
[a@localhost test]$ logout
root:[~]#
root:[~]# chmod o+w test/
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:09:31 CST 2019 on pts/0
[a@localhost ~]$
[a@localhost ~]$ cd /root/test
[a@localhost test]$ touch file1
[a@localhost test]$ ls -la
total 8
drwsr-xrwx. 2 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
[a@localhost test]$ mkdir folder1
[a@localhost test]$ ls -la
total 12
drwsr-xrwx. 3 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
drwxrwxr-x. 2 a a 4096 Aug 16 22:11 folder1
[a@localhost test]$
As you can see, it seems the files and folders the user a created in /root/test didn't inherit the owner and group of it. The owner and group is a and not root. Are there any problems with my testing? I'm new in Linux.
permissions suid
I know what it means for a file to have suid permission. It means when other users have execute permission for it, they execute as the owner of the file. But what does it imply when a folder has suid permission? I did some testing and it seems nothing special for the folder. Could anyone help to plain a little? Thanks.
I'm using Oracle Linux 7.6.
root:[~]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
root:[~]#
Below is my testing on a freshly installed server.
root:[~]# pwd
/root
root:[~]# ls -lad /root
dr-xr-x---. 9 root root 4096 Aug 16 22:07 /root
root:[~]# mkdir test
root:[~]# ls -lad test
drwxr-xr-x. 2 root root 4096 Aug 16 22:07 test
root:[~]#
root:[~]# useradd a
root:[~]# passwd a
Changing password for user a.
New password:
BAD PASSWORD: The password is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
root:[~]# chmod u+s test
root:[~]#
root:[~]# su - a
[a@localhost ~]$ cd /root/test
-bash: cd: /root/test: Permission denied
[a@localhost ~]$ cd /root
-bash: cd: /root: Permission denied
[a@localhost ~]$ logout
root:[~]#
root:[~]# ls -lad /root
dr-xr-x---. 10 root root 4096 Aug 16 22:07 /root
root:[~]# chmod o+x /root
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:08:54 CST 2019 on pts/0
[a@localhost ~]$ cd /root/test
[a@localhost test]$
[a@localhost test]$ pwd
/root/test
[a@localhost test]$ ls -la .
total 8
drwsr-xr-x. 2 root root 4096 Aug 16 22:07 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
[a@localhost test]$ touch file1
touch: cannot touch ‘file1’: Permission denied
[a@localhost test]$ logout
root:[~]#
root:[~]# chmod o+w test/
root:[~]#
root:[~]# su - a
Last login: Fri Aug 16 22:09:31 CST 2019 on pts/0
[a@localhost ~]$
[a@localhost ~]$ cd /root/test
[a@localhost test]$ touch file1
[a@localhost test]$ ls -la
total 8
drwsr-xrwx. 2 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
[a@localhost test]$ mkdir folder1
[a@localhost test]$ ls -la
total 12
drwsr-xrwx. 3 root root 4096 Aug 16 22:11 .
dr-xr-x--x. 10 root root 4096 Aug 16 22:07 ..
-rw-rw-r--. 1 a a 0 Aug 16 22:11 file1
drwxrwxr-x. 2 a a 4096 Aug 16 22:11 folder1
[a@localhost test]$
As you can see, it seems the files and folders the user a created in /root/test didn't inherit the owner and group of it. The owner and group is a and not root. Are there any problems with my testing? I'm new in Linux.
permissions suid
permissions suid
edited 8 hours ago
Just a learner
asked 8 hours ago
Just a learnerJust a learner
6751 gold badge6 silver badges17 bronze badges
6751 gold badge6 silver badges17 bronze badges
3
Possible duplicate of SUID has no effect on directories with Linux
– muru
8 hours ago
Oh yes, thank you. Does this apply to all Linux distribution like Ubuntu? What is the distribution that @m242 mentioned in his answer? It seems that Linux does use suid for directories.
– Just a learner
8 hours ago
2
It applies to all Linux distributions, because this is how the Linux kernel is.
– muru
8 hours ago
There is a lot of history about these flags - worth reading around the whole subject if you want to lean more about all the different approaches for this. https://en.wikipedia.org/wiki/Chmod
– MoopyGlue
7 hours ago
add a comment |
3
Possible duplicate of SUID has no effect on directories with Linux
– muru
8 hours ago
Oh yes, thank you. Does this apply to all Linux distribution like Ubuntu? What is the distribution that @m242 mentioned in his answer? It seems that Linux does use suid for directories.
– Just a learner
8 hours ago
2
It applies to all Linux distributions, because this is how the Linux kernel is.
– muru
8 hours ago
There is a lot of history about these flags - worth reading around the whole subject if you want to lean more about all the different approaches for this. https://en.wikipedia.org/wiki/Chmod
– MoopyGlue
7 hours ago
3
3
Possible duplicate of SUID has no effect on directories with Linux
– muru
8 hours ago
Possible duplicate of SUID has no effect on directories with Linux
– muru
8 hours ago
Oh yes, thank you. Does this apply to all Linux distribution like Ubuntu? What is the distribution that @m242 mentioned in his answer? It seems that Linux does use suid for directories.
– Just a learner
8 hours ago
Oh yes, thank you. Does this apply to all Linux distribution like Ubuntu? What is the distribution that @m242 mentioned in his answer? It seems that Linux does use suid for directories.
– Just a learner
8 hours ago
2
2
It applies to all Linux distributions, because this is how the Linux kernel is.
– muru
8 hours ago
It applies to all Linux distributions, because this is how the Linux kernel is.
– muru
8 hours ago
There is a lot of history about these flags - worth reading around the whole subject if you want to lean more about all the different approaches for this. https://en.wikipedia.org/wiki/Chmod
– MoopyGlue
7 hours ago
There is a lot of history about these flags - worth reading around the whole subject if you want to lean more about all the different approaches for this. https://en.wikipedia.org/wiki/Chmod
– MoopyGlue
7 hours ago
add a comment |
1 Answer
1
active
oldest
votes
According to the GNU manual, it means files (including subfolders) created in the directory will inherit its group and user:
On a few systems, a directory’s set-user-ID bit has a similar effect on the ownership of new subfiles and the set-user-ID bits of new subdirectories. These mechanisms let users share files more easily, by lessening the need to use chmod or chown to share new files.
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535884%2fwhat-does-it-mean-for-a-folder-to-have-suid-permission%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
According to the GNU manual, it means files (including subfolders) created in the directory will inherit its group and user:
On a few systems, a directory’s set-user-ID bit has a similar effect on the ownership of new subfiles and the set-user-ID bits of new subdirectories. These mechanisms let users share files more easily, by lessening the need to use chmod or chown to share new files.
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
add a comment |
According to the GNU manual, it means files (including subfolders) created in the directory will inherit its group and user:
On a few systems, a directory’s set-user-ID bit has a similar effect on the ownership of new subfiles and the set-user-ID bits of new subdirectories. These mechanisms let users share files more easily, by lessening the need to use chmod or chown to share new files.
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
add a comment |
According to the GNU manual, it means files (including subfolders) created in the directory will inherit its group and user:
On a few systems, a directory’s set-user-ID bit has a similar effect on the ownership of new subfiles and the set-user-ID bits of new subdirectories. These mechanisms let users share files more easily, by lessening the need to use chmod or chown to share new files.
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
According to the GNU manual, it means files (including subfolders) created in the directory will inherit its group and user:
On a few systems, a directory’s set-user-ID bit has a similar effect on the ownership of new subfiles and the set-user-ID bits of new subdirectories. These mechanisms let users share files more easily, by lessening the need to use chmod or chown to share new files.
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 7 hours ago
terdon♦
140k34 gold badges287 silver badges466 bronze badges
140k34 gold badges287 silver badges466 bronze badges
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 8 hours ago
m242m242
663 bronze badges
663 bronze badges
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
m242 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
add a comment |
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Since this is Linux, the setuid not doesn't do anything on directories.
– muru
8 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
Does anyone know any of these systems that support SUID on directories?
– Just a learner
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
@Christopher that's my bad, sorry. I edited to include a quote from the manual and included the bit about setgid as well by mistake.
– terdon♦
7 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
It might mean that for some systems, but it doesn't mean that for Linux, which the question mentioned. I'm not sure if there is a authoritative documentation about that for Linux specifically.
– ilkkachu
6 hours ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535884%2fwhat-does-it-mean-for-a-folder-to-have-suid-permission%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Possible duplicate of SUID has no effect on directories with Linux
– muru
8 hours ago
Oh yes, thank you. Does this apply to all Linux distribution like Ubuntu? What is the distribution that @m242 mentioned in his answer? It seems that Linux does use suid for directories.
– Just a learner
8 hours ago
2
It applies to all Linux distributions, because this is how the Linux kernel is.
– muru
8 hours ago
There is a lot of history about these flags - worth reading around the whole subject if you want to lean more about all the different approaches for this. https://en.wikipedia.org/wiki/Chmod
– MoopyGlue
7 hours ago