1.

Can you explain the method of changing file access permission?

Answer»

There are three components of a file permissions

  • Owner permissions − This determines what actions the owner of the file can perform.
  • Group permissions − This determines what actions a group member(of the group that a file belongs to) can perform.
  • Other (WORLD) permissions − This is for everyone else.
$ ls -l /home/sroy8091-rwxr-xr-- 1 sroy8091 users 1024 MAR 23 00:10 myfiledrwxr-xr--- 1 sroy8091 users 1024 Mar 23 00:10 mydir

r, w, and X represent read, WRITE and execute respectively.

To change the file permission we need to run chmod command.

$ ls -l testfile-rwxrwxr-- 1 sroy8091 users 1024 Mar 23 00:10 testfile$ chmod o+wx testfile$ ls -l testfile-rwxrwxrwx 1 sroy8091 users 1024 Mar 23 00:10 testfile

Here we updated the permission for other users, from only read to read, write and execute.



Discussion

No Comment Found