LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 11: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, 12:29 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
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
Durin
LQ Newbie
 
Registered: Jan 2012
Posts: 14

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


Reply


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


All times are GMT -5. The time now is 08:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration