LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-27-2006, 12:54 PM   #1
HGeneAnthony
Member
 
Registered: Mar 2003
Posts: 178

Rep: Reputation: 30
Why doesn't chmod +t stop others from deleting my files in Ubuntu


I run Debian and Ubuntu. In Debian if I use chmod +t on a directory it makes it so only the owner of a file can delete or move it. In Ubuntu 6.10 even though it's set I can delete anyone else's files. I don't know if 6.06 did this but I was wondering why this won't work.
 
Old 10-27-2006, 03:10 PM   #2
nayyares
Member
 
Registered: Oct 2006
Location: JNB, SA
Posts: 33

Rep: Reputation: 15
Hi,

"chmod +t" is basically for sticky bit, if you have set the sticky bit on a directory then it will show you when you do "$ls -l" the directory permission should look like "drwx??????t" sticky bit always comes with others permission and once it is ON, it prevent user to delete files in that directory, except owner and root.

in your case check whether the permission comes as it was suppose to.

thanks
 
Old 10-27-2006, 03:19 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Maybe it has to do with the default Ubuntu setup--in which the main user has some "super user" powers. Try creating another user to see if the permissions work the way they should.

If I could find my soapbox, I would make the speech about the "no root user thing" being the one and only flaw in Ubuntu. Fortunately, it is easy to fix....
 
Old 10-27-2006, 03:44 PM   #4
HGeneAnthony
Member
 
Registered: Mar 2003
Posts: 178

Original Poster
Rep: Reputation: 30
Reply

Well I noticed it does it on Debian as well. Sticky bit is on and the owner of the file was root. I shouldn't have been able to delete it but I could. I don't understand it. Yesterday I tested this out in Debian and it worked today it doesn't. I don't know what I'm doing wrong.
 
Old 10-27-2006, 04:04 PM   #5
HGeneAnthony
Member
 
Registered: Mar 2003
Posts: 178

Original Poster
Rep: Reputation: 30
Reply

Sorry, I found out the problem. The owner of the folder was me. I assumed that even though I owned the folder with the +t switch I couldn't delete any items I didn't own. Once I made the owner root and switched the permission to world writable the problem was fixed.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting old files shiroh_1982 Linux - Newbie 2 06-21-2006 07:26 AM
How to stop Mandriva from deleting updates after they are installed hctham Mandriva 2 03-16-2006 08:35 PM
Deleting files in C monil Programming 4 03-13-2005 10:33 AM
How can I stop rsync from deleting data if network link is dropped? skyfly Linux - Networking 2 06-30-2004 10:35 AM
Deleting files Tingle Linux - Newbie 4 01-16-2003 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:32 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