I just switched to Fedora 27 and was wondering if what I want is possible.

I want a certain user to inherit all permissions from another user (Meaning: Being able to access files as if I were the owner)

I'd like a structure as follows:

├── desktop_user
│   ├── firefox
│   ├── chrome
│   └── games
│       ├── game_1
│       └── game_2
└── All other applications

Where I want the desktop_user to be able to access files from all sub-users in the tree. but firefox and chrome would not be able to act as desktop_user.

The same goes for desktop_user and root. I do not want to have access to root unless I enter a password. I am looking for a clean way to do this, preferably.

  • but firefox and chrome would not be able to act as desktop_user please explain what act like means here! – George Udosen Dec 19 '17 at 15:15
  • I do not want firefox and chrome to gain the same level of permission as the desktop user Meaning: su desktop_user should fail for firefox and chrome – Terminator_NL Dec 19 '17 at 15:20
  • What is a sub-user? – Mark Plotnick Dec 19 '17 at 15:28
  • I could not think of a better term for it, but it's an user which belongs to another user, see the tree above. I want the users in the list to be able to have full control over all their children shown in the tree. So in this case: game_1 is a sub-user of games and games is a sub-user of desktop_user – Terminator_NL Dec 19 '17 at 15:37
  • Create a group for the others and add desktop_user to it so it can act like firefox & co, then add user desktop_user to the /etc/sudoers using visudo command! – George Udosen Dec 19 '17 at 15:45

Allright, I think I have it figured out with the help of George Udosen.

I edited the sudoers rules using: visudo -f /etc/sudoers.d/overrides

desktop_user ALL=(%desktop_child) NOPASSWD: ALL

Where desktop_child is the group assigned to all children in the tree from desktop_user.

This allows desktop_user to sudo all it's children, but not vice versa.

  • I'm confused how "sudo all" grants the user the same file permissions as another user (as per your question). – Jeff Schaller Jan 1 '18 at 14:21
  • I used the set group flag on the filesystem, forcing new files into the desktop_user group. – Terminator_NL Jan 1 '18 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.