Why chown command clears special permissions from a file?

Solution Verified - Updated -

Issue

  • Why chown command clears set-user-ID or set-group-ID or sticky bit permission bits from a file?
  • This is how permissions got changed after executing chown command.
# ls -l /appl/oracle
-rwsr-s--x 1 oracle oinstall 232598621 Jul 22 15:38 /appl/oracle/product/11.2.0.3/bin/oracle
# chown -R oracle.oinstall /appl/oracle
# ls -l /appl/oracle
-rwxr-x--x 1 oracle oinstall 232598621 Jul 22 15:38 oracle

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • coreutils

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.