df permission denied for oracle user

Latest response

uname -a

Linux xxxxxxxxxx 2.6.32-696.16.1.el6.x86_64 #1 SMP Wed Nov 15 14:30:01 PST 2017 x86_64 x86_64 x86_64 GNU/Linux
#

cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.8 (Santiago)

As root
df -h list all the file systems including these:
/dev/mapper/dtfe84_db_dg-lv_dtfe84_db
1.4T 198M 1.3T 1% /dtfe84/dtfe84_db
/dev/mapper/dtfe84_re_dg-lv_dtfe84_rd
7.7G 146M 7.2G 2% /dtfe84/dtfe84_rd
/dev/mapper/dtfe84_tmp_dg-lv_dtfe84_tmp
93G 188M 88G 1% /dtfe84/dtfe84_tmp
/dev/mapper/dtfe84_bkp_dg-lv_dtfe84_bk
769G 197M 730G 1% /dtfe84/dtfe84_bk
/dev/mapper/dtfe83_db_dg-lv_dtfe83_db
385G 195M 365G 1% /dtfe83/dtfe83_db
/dev/mapper/dtfe83_redg-lv_dtfe83_rd
7.7G 146M 7.2G 2% /dtfe83/dtfe83_rd
/dev/mapper/dtfe83_tmp_dg-lv_dtfe83_tmp
25G 173M 23G 1% /dtfe83/dtfe83_tmp
/dev/mapper/dtfe83_bkp_dg-lv_dtfe83_bk_tmp
193G 188M 183G 1% /dtfe83/dtfe83_bk
netappbnt01b:/vol/olapshr_pgfc1i_dr
200G 139G 62G 70% /olapshr/pgfc1i

when I switch to oracle, only these file systems are giving errors

root# su oracle
[oracle]$ df -h
df: /dtfe84/dtfe84_db': Permission denied
df:
/dtfe84/dtfe84_rd': Permission denied
df: /dtfe84/dtfe84_tmp': Permission denied
df:
/dtfe84/dtfe84_bk': Permission denied
df: /dtfe83/dtfe83_db': Permission denied
df:
/dtfe83/dtfe83_rd': Permission denied
df: /dtfe83/dtfe83_tmp': Permission denied
df:
/dtfe83/dtfe83_bk': Permission denied
df: `/olapshr/pgfc1i': Permission denied

[root]# cat /etc/fstab|grep dtfe
/dev/mapper/dtfe84_db_dg-lv_dtfe84_db /dtfe84/dtfe84_db ext3 defaults 1 2
/dev/mapper/dtfe84_re_dg-lv_dtfe84_rd /dtfe84/dtfe84_rd ext3 defaults 1 2
/dev/mapper/dtfe84_tmp_dg-lv_dtfe84_tmp /dtfe84/dtfe84_tmp ext3 defaults 1 2
/dev/mapper/dtfe84_bkp_dg-lv_dtfe84_bk /dtfe84/dtfe84_bk ext3 defaults 1 2
/dev/mapper/dtfe83_db_dg-lv_dtfe83_db /dtfe83/dtfe83_db ext3 defaults 1 2
/dev/mapper/dtfe83_redg-lv_dtfe83_rd /dtfe83/dtfe83_rd ext3 defaults 1 2
/dev/mapper/dtfe83_tmp_dg-lv_dtfe83_tmp /dtfe83/dtfe83_tmp ext3 defaults 1 2
/dev/mapper/dtfe83_bkp_dg-lv_dtfe83_bk_tmp /dtfe83/dtfe83_bk ext3 defaults 1 2
netappbnt01b:/vol/olapshr_pgfc1i_dr /olapshr/pgfc1i nfs defaults 0 0

ls -ld of all these mount points as root.
drwxr-xr-x 3 root root 4096 Feb 21 18:10 /dtfe84/dtfe84_db
drwxr-xr-x 3 root root 4096 Feb 21 18:12 /dtfe84/dtfe84_rd
drwxr-xr-x 3 root root 4096 Feb 21 18:14 /dtfe84/dtfe84_tmp
drwxr-xr-x 3 root root 4096 Feb 21 18:17 /dtfe84/dtfe84_bk
drwxr-xr-x 3 root root 4096 Feb 21 18:19 /dtfe83/dtfe83_db
drwxr-xr-x 3 root root 4096 Feb 21 18:21 /dtfe83/dtfe83_rd
drwxr-xr-x 3 root root 4096 Feb 21 18:22 /dtfe83/dtfe83_tmp
drwxr-xr-x 3 root root 4096 Feb 21 18:24 /dtfe83/dtfe83_bk
drwxrwxrwx 12 root root 4096 Nov 9 18:36 /olapshr/pgfc1i

ls -ld as oracle :
ls: cannot access /mountpoint/name : Permission denied

Responses

Issue is fixed now. Given the 'execute' permission to the user 'oracle for the parent directories of the mount:

found it here https://access.redhat.com/solutions/967913

Which permissions do directories /dtfe83, /dtfe84 and /olapshr have?

[root ]# ls -ld /dtfe84 drwx------ 6 root root 4096 Feb 21 17:26 /dtfe84 [root ]# [root ]# chmod go+x /dtfe84 [root ]# [root ]# ls -ld /dtfe84 drwx--x--x 6 root root 4096 Feb 21 17:26 /dtfe84 [root ]#

issue got resolved here. Now user 'oracle' can successfully list all the file systems using df -h command

[root ]# ls -ld /dtfe84

drwx------ 6 root root 4096 Feb 21 17:26 /dtfe84

[root ]# chmod go+x /dtfe84

[root ]# ls -ld /dtfe84

drwx--x--x 6 root root 4096 Feb 21 17:26 /dtfe84

issue got resolved here. Now user 'oracle' can successfully list all the file systems using df -h command

Hi Masood,

I would have given the mountpoints and the top directory to oracle:dba via chown after the filesystems where mounted.

Now you only "fixed" df for oracle, but oracle cannot write on the filesystems or read from it, if needed.

Regards,

Jan Gerrit Kootstra

Thank you....I will check with them.

Close

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