LinuxQuestions.org
Visit Jeremy's Blog.
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 02-15-2012, 10:39 AM   #1
Durin
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

Quote:
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, 11:29 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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, 12:38 PM   #3
Durin
LQ Newbie
 
Registered: Jan 2012
Posts: 14

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


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

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

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

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