Support Questions

Find answers, ask questions, and share your expertise

Bash_Profile : Cannot change directory to /var/lib/ranger : Permission denied

avatar
Contributor

am getting the below warning message while connecting the VM using virtual box, can you please let me know the significance of this warning and how critical is this access ? how can I address this issue ?

Cannot change directory to /var/lib/ranger : Permission denied

-bash: /var/lib/ranger/.bash_profile: Permission Denied

1083-permission1.jpg

1 ACCEPTED SOLUTION

avatar

@Suresh Raju you can probably ignore this: it should not have impact.

+ @rmolina if this is reproducible, we should file a bug and correct in the future to avoid confusion.

View solution in original post

9 REPLIES 9

avatar

@Suresh Raju you can probably ignore this: it should not have impact.

+ @rmolina if this is reproducible, we should file a bug and correct in the future to avoid confusion.

avatar
Contributor

@Ali Bajwa, Thanks, but can you check if the below error message in anyway related to the access? am trying to get the logs for addressing another issue, but am getting permission denied, am I missing something here?

1085-ambari-server-permission.jpg

avatar

You are not using the correct command. The above command will try to 'execute' the log file as a shell script. If you want to view its contents you need to specify an editor like vi or vim etc

You can use one of the below

more /var/lib/ambari-server/ambari-server.log
tail /var/lib/ambari-server/ambari-server.log
vi /var/lib/ambari-server/ambari-server.log

avatar
Contributor

Thanks @Ali Bajwa, that was a crazy miss from my end..!!

avatar

Sure! Just a friendly reminder to close some of the threads you have opened by accepting an answer once the issue is resolved. That would be a great help because we currently have too many open threads

avatar
Contributor

This is reproducible! I have the same BUG on HDP_2.3.2_virtualbox.ova

1290-20160112-valilla-sandbox-ranger.jpg

avatar
Master Mentor
@Peter Young

I will ignore that "Warning"

avatar
Master Mentor

@Suresh Raju are you still having issues with this? Can you accept best answer or provide your own solution?

avatar
New Contributor

I also get this warning on HDP 2.3.2 - It is only a warning and I'd be interested to know what the impact is. It seems strange that the "ranger" user doesn't have access to the "/var/lib/ranger" folder...especially as there are .bash_profile files in here, suggesting it's some kind of home folder

[root@sandbox ranger]# id ranger
uid=1008(ranger) gid=503(hadoop) groups=503(hadoop),487(ranger)
[root@sandbox ranger]# ls -dl /var/lib/ranger
drwx------ 2 kms kms 4096 2015-10-27 12:56 /var/lib/ranger
[root@sandbox ranger]# ls -la .
total 20
drwx------   2 kms  kms  4096 2015-10-27 12:56 .
drwxr-xr-x. 39 root root 4096 2016-02-28 14:38 ..
-rw-r--r--   1 kms  kms    18 2015-09-22 16:40 .bash_logout
-rw-r--r--   1 kms  kms   176 2015-09-22 16:40 .bash_profile
-rw-r--r--   1 kms  kms   124 2015-09-22 16:40 .bashrc
[root@sandbox ranger]# getent passwd ranger
ranger:x:1008:503:Ranger:/var/lib/ranger:/bin/bash
[root@sandbox ranger]#

Should I make the 'ranger' user part of the kms group? I would still have to make the /var/lib/ranger folder group readable (at least).