0

I just created a new user on my Debian server, but I noticed that it hasn't all privileges to write in specific folders. So, I executed the command chown -R newuser:newuser / and it worked again.

But my question is: Is it secure to solve with this way? If not, how can I solve it? Thanks for the reply :)

  • 4
    Sorry, but if you did that as root, then you most likely broke your system with that command. See e.g. https://unix.stackexchange.com/questions/74295 and https://unix.stackexchange.com/questions/318876 and [similar questions](https://duckduckgo.com/?q=site%3Aunix.stackexchange.com+accidentally+chown&t=ffab&atb=v211-3&ia=web). – Kusalananda May 06 '20 at 14:33
  • if you run that command as root/sudo ... then this ^^ – pLumo May 06 '20 at 14:33

2 Answers2

1

Definitely not secure.

I suggest you learn how Access Control Lists work, apart from the special permissions. Mainly the getfacl & setfacl commands.

Access Control Lists

Special Permissions in Linux

Karov
  • 93
  • 4
1

Nooo, if you ran that as root (or sudo) you just basically ruined the whole filesystem permission structure. You should probably reinstall or find a way to recreate the original set of permissions.

You might want to read more about the permissions in Unix. You have a separate set of permissions for the owner, a group, and everybody else. And then you have extended attributes.

Also, you can get new privileges for some time, using sudo.

Eduardo Trápani
  • 12,032
  • 1
  • 18
  • 35