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.

when i am moving to other disk path , i mistakenly changes the ownership recursively to hdp directory, ​not starting now, how can i change again owner ship for all the services as default

Highlighted

when i am moving to other disk path , i mistakenly changes the ownership recursively to hdp directory, ​not starting now, how can i change again owner ship for all the services as default

Explorer
 
4 REPLIES 4
Highlighted

Re: when i am moving to other disk path , i mistakenly changes the ownership recursively to hdp directory, ​not starting now, how can i change again owner ship for all the services as default

Mentor

@prswamy t

That is ONLY possible if you can remember the user and group before the change.

As the root user at the root of the disk path

[root@yourserver]# chown -R user:group

eg chown -R hadoop:hadoop were hadoop and hadoop (user:group

Re: when i am moving to other disk path , i mistakenly changes the ownership recursively to hdp directory, ​not starting now, how can i change again owner ship for all the services as default

Explorer

i don't remember what is the default user:group, please let me know who is the user:group for the this services(HDFS, MapReduce2, YARN, Tez, Hive, HBase, Pig, Sqoop, Oozie, Zookeeper, Ambari Metrices, Spark)

Highlighted

Re: when i am moving to other disk path , i mistakenly changes the ownership recursively to hdp directory, ​not starting now, how can i change again owner ship for all the services as default

Super Collaborator
@prswamy t

I think you can use rpm command to fix the permissions and ownership to default ...

I did a test by changing the user:group on zookeeper directory and then reset the permssions to default by using rpm command ..

[root@hdp1 tmp]# rpm -qa | grep zoo

zookeeper_2_3_4_0_3485-3.4.6.2.3.4.0-3485.el6.noarch

[root@hdp1 tmp]# ls -ld /usr/hdp/2.3.4.0-3485/zookeeper/lib

drwxr-xr-x 2 root root 4096 Apr 4 22:53 /usr/hdp/2.3.4.0-3485/zookeeper/lib

-->Change ownership

[root@hdp1 tmp]# chown hdfs:hdfs /usr/hdp/2.3.4.0-3485/zookeeper/lib

[root@hdp1 tmp]# ls -ld /usr/hdp/2.3.4.0-3485/zookeeper/lib

drwxr-xr-x 2 hdfs hdfs 4096 Apr 4 22:53 /usr/hdp/2.3.4.0-3485/zookeeper/lib

-->fix the user and group

[root@hdp1 tmp]# rpm --setugids zookeeper_2_3_4_0_3485-3.4.6.2.3.4.0-3485.el6.noarch

-->verify the permissions

[root@hdp1 tmp]# ls -ld /usr/hdp/2.3.4.0-3485/zookeeper/lib

drwxr-xr-x 2 root root 4096 Apr 4 22:53 /usr/hdp/2.3.4.0-3485/zookeeper/lib

Highlighted

Re: when i am moving to other disk path , i mistakenly changes the ownership recursively to hdp directory, ​not starting now, how can i change again owner ship for all the services as default

Explorer

what is the default user:group for the this services(HDFS, MapReduce2, YARN, Tez, Hive, HBase, Pig, Sqoop, Oozie, Zookeeper, Ambari Metrices, Spark)?

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