View previous topic :: View next topic |
Author |
Message |
BioSLuDge Tux's lil' helper
Joined: 12 Jul 2004 Posts: 99 Location: Utah
|
Posted: Sun Jun 03, 2007 8:29 pm Post subject: Permissions surviving chmod 0000? |
|
|
I have a folder that I was trying to restrict permissions on but I can't seam to do it.
I was trying to lock down access on a directory to just user/group but found that I was not able to with just chmod 770. So I tried to chmod 0000 the dir (that should totally make it unusable) but it does not.
These are the permissions that are still associated with the file after running ls -al after the chmod 0000
I should also note that this the root dir of a mounted fs.
Thanks in advanced for your help with what I'm sure is just a stupid little permissions catch that I'm not aware of.
-BioSLuDge |
|
Back to top |
|
|
caslca Tux's lil' helper
Joined: 24 Aug 2003 Posts: 85
|
Posted: Sun Jun 03, 2007 9:31 pm Post subject: |
|
|
Code: | lappy ~ # cd /
lappy / # ls
bin boot dev etc home lib media mnt opt proc root sbin sys tmp usr var
lappy / # mkdir b
lappy / # chmod 0000 b
lappy / # ls -l
total 23
d--------- 2 root root 48 Jun 3 14:28 b
|
What file system are you using? The above test was on reiser3
also, what does "mount" say? |
|
Back to top |
|
|
dleverton Guru
Joined: 28 Aug 2006 Posts: 517
|
Posted: Sun Jun 03, 2007 9:35 pm Post subject: |
|
|
coreutils info page wrote: | On most systems, if a directory's set-group-ID bit is set, newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory. 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.
These convenience mechanisms rely on the set-user-ID and set-group-ID bits of directories. If commands like `chmod' and `mkdir' routinely cleared these bits on directories, the mechanisms would be less convenient and it would be harder to share files. Therefore, a command like `chmod' does not affect the set-user-ID or set-group-ID bits of a directory unless the user specifically mentions them in a symbolic mode, or sets them in a numeric mode. |
So, should do it. |
|
Back to top |
|
|
|