5. Using chown command to forcefully change the owner/group of symbolic file.

Using flag ‘-h’, you can forcefully change the owner or group of a symbolic link as shown below.

  1. ls -l tmpfile_symlnk

lrwxrwxrwx 1 himanshu family 7 2012-05-22 20:03 tmpfile_symlnk -> tmpfile

  1. chown -h root:friends tmpfile_symlnk
  1. ls -l tmpfile_symlnk

lrwxrwxrwx 1 root friends 7 2012-05-22 20:03 tmpfile_symlnk -> tmpfile

via12 Linux Chown Command Examples to Change Owner and Group.

Annunci