-1

How can I give a user permissions for all folders? So /home, /var etc.

  • Do you have very strong reason to do this? Because it is VERY insecure. And what kind of permissions we talk about? – Romeo Ninov Jun 23 '19 at 11:34
  • What about this is insecure? Root has all permissions as well. I'm talking about being able to Upload Files, Edit Files, Remove Files **everywhere** without using sudo, because my SFTP Program doesn't support something like this – OfficialCRUGG Jun 23 '19 at 13:17
  • Use terminal and do the things locally. Upload in some temporary directory and the login with terminal and do the work. – Romeo Ninov Jun 23 '19 at 13:23
  • But I don't want to do login everytime just to move a file which I uploaded in some folder. – OfficialCRUGG Jun 23 '19 at 13:29
  • 1
    Why do you think you want to do this? – Michael Hampton Jun 23 '19 at 16:33
  • Is it so hard to just answer a question? I know that this is considered to be unsafe, but I have my reasons for it. – OfficialCRUGG Jun 25 '19 at 12:40
  • This site is for _professional_ IT, and doing things that are unsafe is not something we wish to encourage. It's not just about you; many other people will read this question and should not be encouraged to develop bad habits. If you actually do have a really good reason for it, then it needs to be disclosed. – Michael Hampton Jun 26 '19 at 14:36
  • @OfficialCRUGG is this question answered, or is there anything unclear? – MacMartin Dec 09 '19 at 09:46

1 Answers1

0

To give a user (e.g. bob) read-permission for all folder in the /tmp/myfiles-directory:

1.) install acl:

sudo apt-get install acl (after running apt-get update)

2.) give the user "bob" read-permission for eveything in (and including) the /tmp/myfiles-directory:

setfacl -m user:bob:r -R /tmp/myfiles

3.) view the permissions on /tmp/myfiles with:

getfacl /tmp/myfiles


To answer the specific case of giving read/write/execute-permissions to everything (although: DONT EVER DO this!!!) set eveything inside root to setfacl -m user:bob:rwx -R /

MacMartin
  • 338
  • 1
  • 4
  • 17