[opensuse] mount point attributes - what is 't' flag?
Hi All, I'm still running 10.2 :-) and looking to fill in some 'missing bits' of information. I've inserted two questions in the following excerpt from a *nix file systems tutorial that I found on the 'net: The permission flags are read left to right 1 directory flag, 'd' if a directory, '-' if a normal file, something else occasionally may appear here for special devices. --> What specific documents, man, info, URL, etc., are available which describe these "something else" optional flags in detail? 2,3,4 read, write, execute permissions for User 5,6,7 read, write, execute permissions for Group 8,9,10 read, write, execute permissions for Other Flag - in any position means "not set" r file is readable w file is writeable (with directories, means files can be added or deleted) x program or script is executable (directory contents can be listed) s where 'x' would normally go is called the set-UID or set-groupID flag --> What would a 't' in the tenth position mean? Example: drwxrwxrwt 4 carl users 160 2007-10-06 09:46 hdb-test/ The relevant fstab line is: /dev/hdb3 /mnt/hdb-test reiserfs noauto,user,acl,user_xattr 1 2 Thanks & regards! Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 06 October 2007 07:46, Carl Hartung wrote:
Hi All,
I'm still running 10.2 :-) and looking to fill in some 'missing bits' of information. I've inserted two questions in the following excerpt from a *nix file systems tutorial that I found on the 'net:
The permission flags are read left to right
1 directory flag, 'd' if a directory, '-' if a normal file, something else occasionally may appear here for special devices.
--> What specific documents, man, info, URL, etc., are available which describe these "something else" optional flags in detail?
Many are specific to a particular file system implementation, and are thus documented in a manual page or other document specific to that file system type. The generic ones are documented (at least on my 10.0 system) in the section-8 man page for the "mount" command.
2,3,4 read, write, execute permissions for User
5,6,7 read, write, execute permissions for Group
8,9,10 read, write, execute permissions for Other
Flag - in any position means "not set" r file is readable w file is writeable (with directories, means files can be added or deleted) x program or script is executable (directory contents can be listed) s where 'x' would normally go is called the set-UID or set-groupID flag
--> What would a 't' in the tenth position mean? Example:
drwxrwxrwt 4 carl users 160 2007-10-06 09:46 hdb-test/
The ancient and now re-purposed "sticky" bit. It used to tell the kernel to keep a binary executable's pages on the swap device even when no process remained running that exectuable. There they could be more rapidly reused when that process was again invoked. File system improvements, shared-code, including shared object file libraries, virtual memory and other improvements have made this interpretation obsolete. Nowadays it has been given an alternate meaning when applied to directories (meaning it does not actually conflict with the old meaning, which was only meaningful for binary executable files). In this context, it means that even if the directory's permissions would ordinarily allow a file to be deleted, the kernel will allow that deletion only if the requestor is the owner (or root, of course). This allows for directories such as /tmp where anyone can create a file without danger of someone else removing it. All other permissions are enforced, so the usual means of interlocking on creation and access control are still in force.
The relevant fstab line is:
/dev/hdb3 /mnt/hdb-test reiserfs noauto,user,acl,user_xattr 1 2
Thanks & regards!
Carl
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 06 October 2007, Carl Hartung wrote:
Hi All,
I'm still running 10.2 :-) and looking to fill in some 'missing bits' of information. I've inserted two questions in the following excerpt from a *nix file systems tutorial that I found on the 'net:
The permission flags are read left to right
1 directory flag, 'd' if a directory, '-' if a normal file, something else occasionally may appear here for special devices.
--> What specific documents, man, info, URL, etc., are available which describe these "something else" optional flags in detail?
2,3,4 read, write, execute permissions for User
5,6,7 read, write, execute permissions for Group
8,9,10 read, write, execute permissions for Other
Flag - in any position means "not set" r file is readable w file is writeable (with directories, means files can be added or deleted) x program or script is executable (directory contents can be listed) s where 'x' would normally go is called the set-UID or set-groupID flag
--> What would a 't' in the tenth position mean? Example:
drwxrwxrwt 4 carl users 160 2007-10-06 09:46 hdb-test/
The relevant fstab line is:
/dev/hdb3 /mnt/hdb-test reiserfs noauto,user,acl,user_xattr 1 2
Thanks & regards!
Carl
Hi Carl, This "t" in the execute spot indicates what we call a sticky bit. A sticky bit works like this: Any user can create a file or directory in a sticky bit directory but only the owner, the root user or the owner of the directory may remove the file or directory. best, Phil -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 06 October 2007 16:46:33 Carl Hartung wrote:
Hi All,
I'm still running 10.2 :-) and looking to fill in some 'missing bits' of information. I've inserted two questions in the following excerpt from a *nix file systems tutorial that I found on the 'net:
The permission flags are read left to right
1 directory flag, 'd' if a directory, '-' if a normal file, something else occasionally may appear here for special devices.
--> What specific documents, man, info, URL, etc., are available which describe these "something else" optional flags in detail?
open info:/coreutils/What information is listed in konqueror and scroll down a bit
2,3,4 read, write, execute permissions for User
5,6,7 read, write, execute permissions for Group
8,9,10 read, write, execute permissions for Other
Flag - in any position means "not set" r file is readable w file is writeable (with directories, means files can be added or deleted) x program or script is executable (directory contents can be listed) s where 'x' would normally go is called the set-UID or set-groupID flag
--> What would a 't' in the tenth position mean? Example:
drwxrwxrwt 4 carl users 160 2007-10-06 09:46 hdb-test/
That is the "sticky" bit. Basically, it means that a file in that directory may only be deleted by its owner. Normally anyone with write permissions to a directory can delete a file in it. The "sticky" bit prevents that
The relevant fstab line is:
/dev/hdb3 /mnt/hdb-test reiserfs noauto,user,acl,user_xattr 1 2
Not really relevant for linux file systems. The permissions aren't mount options, they are stored in the file system itself. Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thank you Randall, Phil and Anders! I really appreciate your replies. The next step is figuring out *how* or *why* the partition in question mounts with a 't' flag in the 'other' permissions set if I mount it as myself (user) or as root? ;-) Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat October 6 2007 11:37, Carl Hartung wrote:
Thank you Randall, Phil and Anders!
I really appreciate your replies. The next step is figuring out *how* or *why* the partition in question mounts with a 't' flag in the 'other' permissions set if I mount it as myself (user) or as root? ;-)
I'm not sure how 'others' got write permissions but the 't' flag disappeared when I adjusted the mount point accordingly. Thanks again! Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 06 October 2007 18:12:48 Carl Hartung wrote:
On Sat October 6 2007 11:37, Carl Hartung wrote:
Thank you Randall, Phil and Anders!
I really appreciate your replies. The next step is figuring out *how* or *why* the partition in question mounts with a 't' flag in the 'other' permissions set if I mount it as myself (user) or as root? ;-)
I'm not sure how 'others' got write permissions but the 't' flag disappeared when I adjusted the mount point accordingly.
I repeat: it has nothing to do with the mount. The permission bits are stored in the partition itself. To change, use "chmod" Specifically, to get rid of the t, use chmod o-t /mountpoint when it's mounted Could it be that this partition used to be /tmp in some previous installation? Beause /tmp always has those permissions set -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 06 October 2007 09:12, Carl Hartung wrote:
On Sat October 6 2007 11:37, Carl Hartung wrote:
Thank you Randall, Phil and Anders!
I really appreciate your replies. The next step is figuring out *how* or *why* the partition in question mounts with a 't' flag in the 'other' permissions set if I mount it as myself (user) or as root? ;-)
I'm not sure how 'others' got write permissions but the 't' flag disappeared when I adjusted the mount point accordingly.
When you say "adjusted the mount point" you must distinguish between the directory on which you mount the file system and the root of the mounted file system. When the files system is mounted, it's root takes over the mounted-on directory. So the modes you apply to the mounted-on directory (while the file system is _not_ mounted) are completely obscured once the file system is mounted. So let's say the mount point directory is "/mnt/mountpoint". If you do an "ls -ld /mnt/mountpoint" while the file system is not mounted and again when it is, you're seeing the information about two completely different directories.
Thanks again!
Carl
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat October 6 2007 13:19, Randall R Schulz wrote:
I'm not sure how 'others' got write permissions but the 't' flag disappeared when I adjusted the mount point accordingly.
Thanks again, Anders and Randall, You're both right, of course, and my apologies for not being very clear. I recursively chmod'd the partition to the desired permissions when mounted and then did the same to the mount point directory with the partition not mounted. Problem solved. :-) regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Anders Johansson
-
Carl Hartung
-
Phil Savoie
-
Randall R Schulz