How to change permissions from root user to all users?

  • I created a folder on the command line as the root user. Now I want to edit it and its contents in GUI mode. How do I change the permissions on it to allow me to do this?

    You can use setfacl command.

  • If I understand you correctly, fire up a terminal, navigate to one level above that directory, change to root and issue the command:

    chown -R user:group directory/

    This changes the ownership of directory/ (and everything else within it) to the user user and the group group. Many systems add a group named after each user automatically, so you may want:

    chown -R user:user directory/

    After this, you can edit the tree under directory/ and even change the permissions of directory/ and any file/directory under it, from the GUI.

    If you truly want any user to have full permissions on all files under directory/ (which may be OK if this is your personal computer, but is definitely not recommended for multi-user environments), you can issue this:

    chmod -R a+rwX directory/

    as root.

    How can I undo the last command you gave?

    @TJonS The last command opens (almost) all permissions to everybody, so undoing it depends on which permissions you want to revoke.

  • Just type in terminal that:

    chmod -R 777 directory/

    And it will be available for all !

    Don't give `777` to any directory!

  • Just use this linux command

    sudo chown -R :users your_directory

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM