LinuxQuestions.org
Review your favorite Linux distribution.
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 08-29-2006, 04:06 PM   #1
kramer2718
Member
 
Registered: Jul 2006
Posts: 46

Rep: Reputation: 15
Directory permissions


Hi. I'm trying to set up a directory where users can store their files but not delete them. I would like users to be able to create files, list the contents of the directory and read files. What I would not like them to be able to do is to delete files (I guess that it's okay if they can delete their own files, but they should not be able to delete others files).

Right now I have the directory set as drwxrwxr-x but this still allows user x to delete user y's files. How can I set up the permissions for this?
 
Old 08-29-2006, 04:18 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
change the group owner so that user X can't delete owner Y's files. so X would have x owner and x group and y would have y group and y owner.
 
Old 08-29-2006, 04:34 PM   #3
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Quote:
Originally Posted by kramer2718
Hi. I'm trying to set up a directory where users can store their files but not delete them. I would like users to be able to create files, list the contents of the directory and read files. What I would not like them to be able to do is to delete files (I guess that it's okay if they can delete their own files, but they should not be able to delete others files).

Right now I have the directory set as drwxrwxr-x but this still allows user x to delete user y's files. How can I set up the permissions for this?
Try the sticky bit on the directory like:

Code:
chmod 1775 directory-name
rwxrwxr-x translates to 775.

To learn more about sticky bit...go here.
Tux,

Last edited by tuxrules; 08-29-2006 at 04:36 PM.
 
Old 08-29-2006, 06:06 PM   #4
kramer2718
Member
 
Registered: Jul 2006
Posts: 46

Original Poster
Rep: Reputation: 15
Great. Thank you. I think I actually wanted chmod 1777 but thanks so much.

Are there any security issues with the sticky bit that I should be aware of before I start letting others in to my system?
 
  


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
Same directory, different permissions XmisterIS Linux - General 8 08-03-2006 02:48 AM
New directory permissions Paulsuk Linux - General 3 05-18-2005 06:36 AM
Directory permissions mephitic Linux - Security 3 04-12-2004 12:51 AM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM
directory permissions knueven7 Linux - Software 1 04-14-2003 09:00 AM


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