Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-15-2012, 11:39 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 14

Rep: Reputation: Disabled
Sticky bit doubt

hey there

I have a problem in understanding the point of a sticky bit, since what it was supposed to do, it's already been done via regular permissions...i might be doing this in a wrong way, but here's an example

user x and user y are from the same group

logging as user x
$ chmod 1777 filexy
$ chmod 777 filez

logging as user y
$rm filexy
prompts an error about permission denied... all good

$rm filez
prompts the same exact error...shouldn't i be able to delete this file with any user, even more if i'm from the same group as the user x?

This is my doubt. the sticky bit looks pointless because even with not setting that special bit, every other user can't remove a file or directory unless it's the owner.

Working on a Debian system, in a virtual machine.

Thanks in advance
Old 02-15-2012, 12:29 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,520
Blog Entries: 15

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
The permissions on the directory also control what can be done to files within it. If the user doesn't have permission to create/remove files in a directory then the permissions of the file within that directory don't matter. Similarly if a user does NOT have permissions to navigate to a specific directory it won't matter if the file is 777.

There are different items for different things. You can even gain more granular control using Access Control Lists (ACLs) which would make the seeming permissions allowed by chmod appear not to work.
Old 02-15-2012, 01:38 PM   #3
LQ Newbie
Registered: Jan 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Yeah, that makes sense. Thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Sticky situation bcos of sticky bit Voyager7 Linux - Newbie 4 03-01-2011 12:29 AM
sticky bit lipun4u Linux - Newbie 8 02-28-2010 05:17 PM
About Sticky bit... masudur_iiu General 4 09-13-2006 11:23 AM
Sticky Bit tarballed Linux - General 4 07-03-2002 04:54 PM
sticky bit motiram Linux - General 1 08-01-2001 01:34 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:52 AM.

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