Updating the adm files
So, if we check the file3 in dir1 after the example above, we can see that even though dir1 now belongs to user nobody, file3 in it still belongs to me: If your intention is to change ownership of all the files and directories of a certain location in your filesystem, you need to use a -R option of the chown command, which means recursive ownership change: ubuntu# chown -R greys /home/greys/example/ ubuntu# ls -l /home/greys/example/ total 4 drwxr-xr-x 2 greys admin 4096 Feb 9 dir1 -rw-r--r-- 1 greys admin 0 Feb 9 file1 -rw-r--r-- 1 greys admin 0 Feb 9 file2 Similar to the chown command, there's a command specifically helping you with changing not the owner (user) of a file.
IMPORANT: unlike chown command, chgrp can be used by non-privileged (regular) users of a system.
As seen above in the system crontab, this rotation will take place at (RHEL, Centos, Fedora, etc.) the functionality covered above doesn’t exist by default (even though I don’t see why it could not be implemented if someone wants it).
On these operating systems, this is handled also by logrotate as shown in the next part.
The same logic applies to other people not being able to become owners of your files, even if they're willing to assume the new responsibilities of owning files.
They cannot revoke your ownership, because each Unix user is only allowed to make decisions and take actions on his/her own behalf.
The next field is a Unix group of each file's owner – admin in my example.# # For more information see syslog.conf(5) # manpage.auth,authpriv.* /var/log/*.*;auth,-/var/log/syslog #cron.* /var/log/daemon.* -/var/log/kern.* -/var/log/lpr.* -/var/log/mail.* -/var/log/user.* -/var/log/uucp.* /var/log/...Changing file ownership means only updating the association between a Unix user and a file, and nothing else.When you're changing the owner of a file, no data contained in a file is changed.
That's why you will probably see an error like this if you attempt to change ownership of a file as your own regular Unix user: If you're going to change owner of a few files, this can easily be done using either a full list of files or a mask.