LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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


Closed Thread
  Search this Thread
Old 11-03-2009, 05:26 PM   #1
prakashkumar84
LQ Newbie
 
Registered: Nov 2009
Location: chennai
Posts: 16

Rep: Reputation: 0
what is the difference between chmod and setfacl


Hi All,

could any one tell me the exact difference between chmod and setfacl commands?.

Thanks,
Prakashkumar.M
 
Old 11-03-2009, 07:23 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Homework ? ?

man chmod

man setfacl
 
Old 11-04-2009, 01:49 AM   #3
prakashkumar84
LQ Newbie
 
Registered: Nov 2009
Location: chennai
Posts: 16

Original Poster
Rep: Reputation: 0
Hi,

Thanks for your quick reply.

I know the 'man' command very well, but i need to know the exact difference, something with explanation.

Thanks.
 
Old 11-04-2009, 01:57 AM   #4
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Read the man page for setfacl

Pay attention to the Examples

It should become apparent what the difference is.
 
Old 11-04-2009, 11:00 AM   #5
prakashkumar84
LQ Newbie
 
Registered: Nov 2009
Location: chennai
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks.
 
Old 11-09-2009, 01:06 AM   #6
prakashkumar84
LQ Newbie
 
Registered: Nov 2009
Location: chennai
Posts: 16

Original Poster
Rep: Reputation: 0
sorry, I couldn't find the exact diff thr man pages. Can somebody give me an exact diff?.
 
Old 11-09-2009, 03:12 AM   #7
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
chmod only caters for permissions based on owner group all:

-rwx------ = read,write, and execute for owner only:
Code:
chmod 700 file
-rwxrwx--- = read,write, and execute for owner and 1 specific group:
Code:
chmod 770 file

setfacl allows for much greater control over who has access to a specific file or folder.

You can grant an additional user read access to a file:
Code:
setfacl -m u:lisa:r file
 
1 members found this post helpful.
Old 11-10-2009, 04:41 PM   #8
prakashkumar84
LQ Newbie
 
Registered: Nov 2009
Location: chennai
Posts: 16

Original Poster
Rep: Reputation: 0
Great.

Thanks.
 
Old 12-10-2009, 06:55 PM   #9
MauMau
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 1
I think a complete explanation of this can be found at http://www.suse.de/~agruen/acl/linux-acls/online/ where the author Andreas Grünbacher explain in details the differences of the two. The author was involved in the design and implementation of extended attributes and ACLs on Linux and he goes in details that makes this issue clear for the reader. Hope this can helps.

Enjoy,

MauMau
 
1 members found this post helpful.
Old 12-11-2009, 12:15 AM   #10
prakashkumar84
LQ Newbie
 
Registered: Nov 2009
Location: chennai
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks
 
Old 09-29-2017, 10:55 AM   #11
vande012
Member
 
Registered: Jul 2007
Location: Carrollton, Texas
Distribution: cent os 7 , windows 7
Posts: 83

Rep: Reputation: 15
chmod and chown

can setfacl be accomplished by using chown and chomod?

I ask because I am using puppet to set file permissions and setfacl is not a native puppet command
 
Old 09-29-2017, 12:39 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by vande012 View Post
can setfacl be accomplished by using chown and chomod?
I ask because I am using puppet to set file permissions and setfacl is not a native puppet command
Read the LQ Rules...you re-opened a thread that had been closed for EIGHT YEARS, hijacked it with a different question, and double-posted that question.

Post reported to moderators.
 
Old 09-29-2017, 12:48 PM   #13
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Here's the long-and-short of it:

"Way back in the 1970's, what seemed good-enough to the programmers at Bell Labs was a simple "file permissions mask." Everything had a "user-id" and a "group-id" and access was very-simply determined by rwxrwxrwx. Simple, tiny, and – at the time – it worked.

As time went on, various people (working among various operating systems and file systems) recognized the need for more-sophisticated forms of access control. Hence, the access control list (ACL).

Generally speaking, ACLs supersede file permission masks.

Alas, "the fly in the ointment" is that not everyone who dreamed-up "an ACL system" decided to do it in exactly the same way. Hence, when you work with ACLs you will encounter various mapping systems which try their best to accommodate software which expects ACLs to work in one particular way.

Nevertheless, ACLs are very important because they do compensate for many of the pragmatic deficiencies of Unix's original concepts – which were perfectly adequate for a PDP-7! (And of course, the very similar original concepts devised for CP/M, MS-DOS, etcetera.)

You need to be pragmatically aware of, and pragmatically conversant in, both concepts as they apply to your particular operating environment(s), whatever they might be.

Last edited by sundialsvcs; 09-29-2017 at 12:49 PM.
 
Old 09-29-2017, 03:22 PM   #14
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
See other post. https://www.linuxquestions.org/quest...cl-4175614743/

Last edited by jefro; 09-29-2017 at 03:24 PM.
 
  


Closed Thread



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
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
setfacl erat123 Linux - Security 2 05-30-2007 11:16 PM
setfacl linuxjamil Linux - Security 1 04-05-2007 02:00 PM
chmod, external usb, vfat - can't chmod a directory itsjustme Slackware 2 04-02-2006 04:23 PM
Setfacl subaruwrx Fedora 3 09-07-2004 09:18 AM

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

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