[Email protected]:p Ractice] LS-Lrttotal A-rwxrwxrwx1Berry Berry -Dec - Ten: -F1.txt-rwxrwxrwx1Berry Berry206Dec - Ten:WuyiF2.txt-rwxrwxrwx1Berry Berry372Dec - -: -F3.txt[[email protected]:p Ractice] chown guest:guest f1.txt chown:changing ownership of ' f1.txt ': Operation not Perm Itted[[email protected]:p Ractice] LS-Lrttotal A-rwxrwxrwx1Berry Berry -Dec - Ten: -F1.txt-rwxrwxrwx1Berry Berry206Dec - Ten:WuyiF2.txt-rwxrwxrwx1Berry Berry372Dec - -: -F3.txt[[email protected]:p Ractice] chown root:root f1.txt chown:changing ownership of ' f1.txt ': Operation not permit Ted[[email protected]:p Ractice] sudo chown guest:guest f1.txt [[email protected]:p Ractice] LS-Lrttotal A-rwxrwxrwx1Guest Guest -Dec - Ten: -F1.txt-rwxrwxrwx1Berry Berry206Dec - Ten:WuyiF2.txt-rwxrwxrwx1Berry Berry372Dec - -: -F3.txt
In fact, this should be a matter of authority. First you need to know that root is the highest-privileged user and your current user is Berry.
Its permissions are lower than root, so a problem occurs when the file owner is changed to root.
If your current user is root and assigns file permissions to Berry, or to other users such as root, then it will be successful.
(1) sudo can solve the problem.
(2) First su to the root user, and then chown root:root f2.txt Change permissions, exit the root user at exit, at this time to view the file permissions have changed.
Linux Change file owner Command chown command use confusion