WebSphere Issues

23/04/2017

chmod, chown, chgrp commands in Linux

Filed under: Other — Ishtiaque @ 12:35 pm
  • Octal -> Read(4), Wite (2), Execute (1)
  • Symobolic -> o+rwx, g+rwx, u+rwx = o=owner, g=group, u=user/other

chmod:

  • chmod ou+x,g-w file   (‘owner’ and ‘user’ -> execute and group -> remove write)
  • chmod 755 file             (Owner -> rwx (7); Group-> rx; Others-> rw)

chown:

  • chown user afile (Changes user owner)
  • chown user:grp file (Changes user and group ownership togather)
  • chown -r user:grp dir (Changes user and group on subdirectores)

chgrp:

  • chown grp file (Changes group owner)

getfacl:

  • getfacl file (View permission assigned on a file)
  • getfacl dir (View permission assigned on a directory)

setfacl:

  • setfacl -m u:user:rx /tmp/file
Advertisements

Blog at WordPress.com.

%d bloggers like this: