# - bof - # # - - # # - Documentation - # https://www.fosslinux.com/35728/ways-to-use-the-chown-command-with-examples.htm https://www.linuxfordevices.com/tutorials/linux/chown-command-in-linux # - - # # - Command sintax - # # - Change owner of directory and contents recursively (-R) - # chown -R chmod -R # - - # # - To run - # sudo chmod -R 775 Images sudo chown -R is_derayo:is_derayo2 Images sudo chown -R 1000:1001 Images :a # - - # # - Arch - # # - Create group & user - # :a.1 # - - # # - Create group - # sudo groupadd -g 1000 is_derayo2; sudo groupadd -g 1001 is_derayo2; :a.2 # - - # # - Create user - # sudo useradd -r -u 1000 -g 1000 -s /usr/bin/nologin is_derayo2; sudo useradd -r -u 1001 -g 1001 -s /usr/bin/nologin is_derayo2; :b # - - # # - chmod - # chmod -R 774 VBox-Configuration/ sudo chmod -R 774 VBox-Configuration/ chmod -R 774 * sudo chmod -R 774 * :c # - - # # - chown - # :c.1 # - - # # - chown -R - # chown -R is_derayo:is_derayo2 * sudo chown -R is_derayo:is_derayo2 * chown --from=ninad:ninad ninad:sudo folder1/ sudo chown --from=is_derayo is_derayo file.txt sudo chown –from=[:current_group] [:new_group] [filename] sudo chown -from=:is_derayo is_derayo file.txt :c.2 # - - # # - Copy file settings to another file - # chown --reference=example.txt sample-file.txt sudo chown --reference=example.txt sample-file.txt :c.3 # - - # # - Symbolic links (linked file) - # sudo chown root:sudo Linux-symlink # - Change original file - # chown -h ninad:sudo Linux-symlink :c.4 # - - # # - Multiple files - # chown : file1 file2 file3 chown -R ninad:sudo * chown -R ninad: folder1 chown ninad:sudo Linux.txt LinuxForDevices.txt Linux-symlink sudo chown ninad:sudo Linux.txt LinuxForDevices.txt Linux-symlink # - - # # - bof - #