Friday, May 6, 2022

[SOLVED] Unix permissions

Issue

I have a file of which I need to change contents, that has these permissions:

-rw-r--r-- 

How do I find out which permissions group I belong to, so I can do a chmod command?

I just tried to do chmod and I got an error:

$ chmod 777 hosts
chmod: Unable to change file mode on hosts: Operation not permitted

Here is my ls -l

-rw-r--r--  1 root  wheel  313 Apr 16 13:04 hosts

Solution

'ls -l' will tell you all you need to know.

Permissions Directories Group   Size    Date            Directory or file 
drwx------  2           users   4096    Nov 2 19:51     mail/

If you have root permission, try a 'sudo chmod 777 hosts'.



Answered By - Daniel Bidulock
Answer Checked By - Robin (WPSolving Admin)