• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 479
  • Last Modified:

chmod and chown

Hi
When working in Linux,
can anyone but root change the ownership of a file or directories?
can anyone but root and the owner of a file or directory, change the permissions by chmod?

thanks.
0
mehranalmasi
Asked:
mehranalmasi
1 Solution
 
m1tk4Commented:
>> can anyone but root change the ownership of a file or directories?

No. However a file owner may change it's group to one of the group he/she is a member of.

>>can anyone but root and the owner of a file or directory, change the permissions by chmod?

No.
0
 
martinCommented:
http://www.die.net/doc/linux/man/man2/chown.2.html says: "Only the super-user may change the owner of a file." and
http://www.die.net/doc/linux/man/man2/chmod.2.html says: "The effective UID of the process must be zero or must match the owner of the file."

0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now