Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ranger authorization for HDFS - Unable to change ownership of a directory in hdfs

Solved Go to solution
Highlighted

Re: Ranger authorization for HDFS - Unable to change ownership of a directory in hdfs

Super Guru

I do have access to hdfs user and yes we can change the ownership using

sudo -u hdfs hadoop fs -chown <some-user> /user/oozie/test1

I just wanted to ensure that if this is expected behavior that even after granting rwx via Ranger authorization we cannot change the ownership.

Re: Ranger authorization for HDFS - Unable to change ownership of a directory in hdfs

Contributor

Yes, this is the expected behavior. Ranger Policies are just for the ACL and not for ownership. The right way to do out here is to use Ranger for all the ACLs. You should you want root to access /user/oozie/test1, then from Ranger Admin, you should give "root" the required access to the folder. Ideally, you shouldn't play with owner and group.

Highlighted

Re: Ranger authorization for HDFS - Unable to change ownership of a directory in hdfs

Super Guru

@bdurai - Thats correct! Thank you.

Highlighted

Re: Ranger authorization for HDFS - Unable to change ownership of a directory in hdfs

Mentor

@Kuldeep Kulkarni has this been resolved? Please accept best answer or provide your own solution.

Highlighted

Re: Ranger authorization for HDFS - Unable to change ownership of a directory in hdfs

Super Guru

Based on all the discussion, this is expected behavior. Even after giving full permissions via ranger, only superuser can modify ownership.

Don't have an account?
Coming from Hortonworks? Activate your account here