Solved

Posix Permissions in Linux

Posted on 2014-03-01
9
353 Views
Last Modified: 2014-03-17
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
Comment
Question by:jskfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 18

Assisted Solution

by:Gary Davis
Gary Davis earned 125 total points
ID: 39898136
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
 
LVL 62

Assisted Solution

by:gheist
gheist earned 125 total points
ID: 39898791
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
 

Author Comment

by:jskfan
ID: 39899342
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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 18

Expert Comment

by:Gary Davis
ID: 39899363
As a standard, Posix applies to Linux, Unix and other variants that adhere to that standard.
0
 
LVL 30

Expert Comment

by:serialband
ID: 39899719
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
 
LVL 62

Expert Comment

by:gheist
ID: 39899749
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
 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 125 total points
ID: 39902872
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
 
LVL 30

Accepted Solution

by:
serialband earned 125 total points
ID: 39904956
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
 

Author Closing Comment

by:jskfan
ID: 39935679
Thank you Guys
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question