LinuxQuestions.org
Visit Jeremy's Blog.
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 04-22-2014, 08:21 AM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Rep: Reputation: 22
Post ACL , Create file but can't Delete


Hello All.
How can I use setfacl to set a permission for my group, That group members can read and create file but can't delete?

Cheers.
 
Old 04-22-2014, 08:59 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by jokar.mohsen View Post
Hello All.
How can I use setfacl to set a permission for my group, That group members can read and create file but can't delete?
You don't, because the question itself makes no sense.

If a user can WRITE to the directory, that means they can MODIFY what's there...including DELETE files. You can easily do read-only, but if you want what you're after, you need to use selinux for it. Since you asked about selinux TWO YEARS AGO:
http://www.linuxquestions.org/questi...nd-4175419558/

...you should already be familiar with it.
 
Old 04-22-2014, 09:34 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Actually, If you remove write from the directory, you will not be able to create or delete files in the directory, but you will be able to modify. Fyi,.
 
  


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
allowed to create/edit a file but not to DELETE A FILE. micro_xii Linux - Newbie 9 05-10-2012 07:22 PM
Why does the ACL of a file created under a directory differ from the default ACL sctebnt Linux - Security 5 12-02-2011 08:13 AM
Create the file, write into that file but can't delete file in Linux pandunr Linux - Newbie 3 06-15-2011 08:45 AM
File create/modify/delete monitoring with user account wdominick Linux - Software 3 01-27-2011 03:11 PM
Help create perl script for delete file/folder sportivo888 Linux - Newbie 5 12-05-2007 11:33 PM

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

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