ls -l = Print files in a long listing format, you can see ownership and permissions of the fileOwnership:
sudo chown [username]:[groupname] [filename] = Change ownershipsudo chown tom:admin test.txt = Change ownership of 'test.txt' file to 'tom' and group 'admin'sudo chown admin test.txt = Change ownership of 'test.txt' 'admin' usersudo chgrp devops test.txt = Make 'devops' group owner of test.txt filePossible File Permissions (Symbolic):
Change File Permissions for different owners
File Permissions can be changed for:
Minus (-) removes the permission
sudo chmod -x api = Takes 'execute' permission away for 'api' folder from all ownerssudo chmod g-w config.yaml = Takes 'write' permission away for 'config.yaml' file from the group