LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2011, 04:31 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Permission bit


Can anyone tell me what is this L bit in groups last bit ??
I got this line in one of my directory..


Code:
-rwxrwLr-x    1 tmmlprod user      956900 Dec 10 15:32 409001000114.pdf

Last edited by divyashree; 12-10-2011 at 05:05 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-10-2011, 05:08 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Some implementations of the ls command use L to denote the set-group-id bit, whereas you usually see a S. The uppercase L means that the execution bit is not set, otherwise you would see a lowercase l. The same applies when ls shows it as S or s.

An example of an executable with the setgid bit set is the command wall. In this case the l should be lowercase, since the execution bit is set. Check it on your system to verify:
Code:
ls -l `which wall`
At this point I'm curious... which system are you running on and what implementation of the ls command is this?

Lastly, you can find some information about the L permission bit here.

Last edited by colucix; 12-10-2011 at 05:13 AM.
 
2 members found this post helpful.
Old 12-10-2011, 05:25 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by colucix View Post
Some implementations of the ls command use L to denote the set-group-id bit, whereas you usually see a S. The uppercase L means that the execution bit is not set, otherwise you would see a lowercase l. The same applies when ls shows it as S or s.

An example of an executable with the setgid bit set is the command wall. In this case the l should be lowercase, since the execution bit is set. Check it on your system to verify:
Code:
ls -l `which wall`
At this point I'm curious... which system are you running on and what implementation of the ls command is this?

Lastly, you can find some information about the L permission bit here.
I got this :

Code:
-rwxr-xr-x    1 root     sys        19332 Sep  2 18:54 /sbin/wall


Thanks for the info. But if executable bit is not set, then it should remain blank.
 
Old 12-10-2011, 06:50 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by divyashree View Post
I got this: -rwxr-xr-x 1 root sys 19332 Sep 2 18:54 /sbin/wall
Ok, there are differences from system to system on how permissions are set. On which system do you see the L behaviour anyway?
Quote:
Thanks for the info. But if executable bit is not set, then it should remain blank.
Good point! Indeed the setgid bit has a different meaning if applied to executables, not-executables or directories:

1. on executables: the user who executes the program gains privileges of the group to which the file is assigned.
2. on not-executables: processes are granted to use the mandatory locking on these files. See this document for details: http://kernel.org/doc/Documentation/...ry-locking.txt
3. on directories: this causes new files created inside the directory to inherit its group ID.

Last edited by colucix; 12-10-2011 at 06:59 AM.
 
1 members found this post helpful.
Old 12-19-2011, 09:56 PM   #5
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by colucix View Post
Ok, there are differences from system to system on how permissions are set. On which system do you see the L behaviour anyway?

Good point! Indeed the setgid bit has a different meaning if applied to executables, not-executables or directories:

1. on executables: the user who executes the program gains privileges of the group to which the file is assigned.
2. on not-executables: processes are granted to use the mandatory locking on these files. See this document for details: http://kernel.org/doc/Documentation/...ry-locking.txt
3. on directories: this causes new files created inside the directory to inherit its group ID.
Thanks colucix for the nice info.

Actually I got it on an very old Unix System ( IRIX 6.5 ).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 02:02 PM
[SOLVED] Installing 32 bit RPMs on 64 bit Linux conflicts with 64 bit packages gheibia Linux - Server 1 08-18-2011 01:33 AM
Permission bit calculator script ... ??? newbie01.linux Linux - General 3 05-03-2010 04:01 AM
group permission the sticky bit permission comes in capital 'S' pkishorenayak Linux - Newbie 1 04-11-2008 05:04 PM
Linux File permission & the sticky bit hq4ever Linux - Newbie 8 07-02-2004 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration