• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Posix Permissions in Linux

The word Posix is used in Linux , I have checked it is definition in Google, but the usage of the word such as Posix permission, is a bit confusing to me.

Can someone give clear and simple explanation of Posix?
Thank you
0
jskfan
Asked:
jskfan
  • 2
  • 2
  • 2
  • +2
4 Solutions
 
Gary DavisDir Internet SvcsCommented:
A file, for example, in Linux has a set of permissions like you the owner can read it, write it or execute it or any combination of those three permissions (rwx). If you can read but not write, it is represented as (r--).

As a number representation, read is 4, write is 2 and execute is 1. Add up the allowed permissions and you get a number from 0 to 7. If you can read and execute, the permission is a 5.

If you are in a group that has permissions to the file, you also may have a different set of those three permissions like maybe the owner has all three (7) but members of the group has only read and execute (5).

Finally, everyone else (other) has its own set of those three permissions. For example maybe other has no permissions (0).

The permissions are layed out with owner, group and other, each with the 3 characters. This example results in (rwxr-x---).

There is another position on the left that is a "d" if the entry is a directory instead of a file.

The command line command to change permissions is chmod (change mode).

More details are at http://www.thetechrepo.com/main-articles/494-understanding-file-and-folder-permissions-posix-on-linux-and-mac-os-x - Understanding File and Folder Permissions (POSIX) on Linux and Mac OS X (using chmod) .

Gary Davis
0
 
gheistCommented:
POSIX is a standard
E.g POSIX semantics of file permissions like on all UNIX systems:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_04
0
 
jskfanAuthor Commented:
I was trying to understand the word POSIX, what relation it has with permissions…
it is used a lot with Posix permissions…why not just Linux permissions
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Gary DavisDir Internet SvcsCommented:
As a standard, Posix applies to Linux, Unix and other variants that adhere to that standard.
0
 
serialbandCommented:
POSIX stand for Portable Operating Systems Interface.  It is a family of standards set by the IEEE for operating compatibility between Unix environments.   Solaris, AIX, HP-UX, IRIX, etc... are fully POSIX compliant to some variant of the POSIX standard.

Linux is only mostly POSIX compliant and not actually certified by the standards committee.  The permissions structure in Unix and Linux follow the standards so that they are compatible to each other.  The same chmod command will work the same on every POSIX system.  It's a guaranty that they work identically in a minimal fashion.
0
 
gheistCommented:
POSIX it standard for minimal facilities in a UNIX system (e.g if you read it you can make shell script or C program work exactly same on any certified UNIX)

Linux equivalent is LSB.
0
 
SandyCommented:
What best i found is :

Basically it was a set of measures to ease the pain of development and usage of different flavours of UNIX by having a (mostly) common API and utilities. Limited POSIX compliance also extended to various versions of Windows.

POSIX compliant operating systems would be FBSD and Linux, yet both have rather different file system organization and default library installations.

TY/SA
0
 
serialbandCommented:
FreeBSD and Linux are POSIX Compliant, but not officially certified by the Open Group Standards committee.  http://www.opengroup.org/  While interesting, that's irrelevant to the POSIX permissions.  It mainly means that nobody submitted them for certification.

The organization of the files is not a part of the standard, but the description of the permission structure is.  Basically, commands such as chmod, chgrp, chown, cd, mkdir, etc... all should work the same way since the file permissions are structured the same way.  They don't care where you place every file and directory.

OSX is certified and has a different file organization and Library layout.  It has the basic file permissions as well as the standard minimal command set, but they do have numerous other commands that don't exist on any other system.  http://www.opengroup.org/openbrand/register/brand3602.htm

There's a list of them here: http://www.opengroup.org/openbrand/register/

You should also remember that POSIX is a minimal standard.  Passwords and account names can have lengths greater than 8 characters now.  POSIX certified Solaris still has utilities that only display or operate on 8 characters.  For example, I've had to download a copy of the source code for the last command from Solaris X86 to recompile on Sparc to view account names more than 8 characters from wtmp.  Linux utilities already do that and have been doing that for years.
0
 
jskfanAuthor Commented:
Thank you Guys
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now