LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Reply
  Search this Thread
Old 02-03-2020, 01:20 PM   #1
etcetera
Member
 
Registered: Aug 2004
Posts: 436

Rep: Reputation: 17
Possible to use sudo definitions to override chmod value? Or use ACL?


this construct here doesn't override chmod permissions on /test folder, is there any /etc/sudoers definition that can?


username ALL = (root:root) NOPASSWD: /test

I realize that ACL is a great alternative and it works, kind of, in my case, but the files do not inherent the root folders ACL settings, that is, if a user creates a new file and puts it in /test, it no longer has the attributes of the folder it's in and the setfacl command has to be re-run. There has to be a better solution.

I don't want to set files to 770 and use group ownership to grant access. The folder in question is set to 711 which work for me.
 
Old 02-03-2020, 01:47 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,066

Rep: Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363
you need to read the man page of sudo. Just the first sentence: it is used to execute a command as another user, not to rule permissions on directories.
But you are allowed to modify permissions as root (= execute chmod) on any directory.
what you really need is the setgid bit on directory (if I understand well): https://www.gnu.org/software/coreuti...nd-Setgid.html
 
1 members found this post helpful.
Old 02-03-2020, 04:09 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I am not sure if I understand your requirement, but it looks like default ACLs might be another solution.
 
  


Reply



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
Why user can override the ACL file Ashish Sood Linux - General 4 05-04-2013 08:38 AM
strange value assignments variable = value, value?? ostrow30 Programming 2 07-24-2011 07:59 AM
difference between value *value and value * value PoleStar Linux - Newbie 1 11-26-2010 03:37 PM
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
kernel value definitions maelstrombob Linux - General 1 11-20-2003 10:56 AM

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

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