Home » RDBMS Server » Server Administration » Is it required that the gid and uid at the destination server be the same as the source in nfs confi (10.2.0.4, SLES 10 SP4, Oracle Linux 5.8)
Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #665057] Sun, 20 August 2017 20:23 Go to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear all,

DB server is 10.2.0.4 SE.

My destination server, is Oracle Linux 5.8,

here's the df settings:

[oracle@svritest-vm ~]$ df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol01
              ext3     22G  4.9G   16G  24% /
/dev/mapper/VolGroup02-LogVol00
              ext3    1.6T  235M  1.5T   1% /u03
/dev/mapper/VolGroup03-LogVol00
              ext3     30G  9.7G   18G  36% /home
/dev/mapper/VolGroup00-LogVol00
              ext3     23G  2.9G   19G  14% /u01
/dev/mapper/VolGroup01-LogVol00
              ext3    775G  216M  735G   1% /u02
/dev/sda1     ext3    190M   24M  157M  13% /boot
tmpfs        tmpfs    2.0G     0  2.0G   0% /dev/shm
/dev/sr1   iso9660    3.0G  3.0G     0 100% /media/Oracle Linux Server src 20120229
/dev/sr0   iso9660     71M   71M     0 100% /media/VMware Tools
fskch01:/vol/svspace/backup/SVRIDB
               nfs    3.0T  1.2T  1.9T  38% /orabackup

NFS folder permission

[oracle@svritest-vm ~]$ ls -ld /orabackup/ribackup
drwxr-xr-x 2 102 105 4096 Aug 21 07:00 /orabackup/ribackup

My original server, is SLES 10 SP4,
my original server folder,


yury@svri01:/home/yury $ ls -ld /orabackup/ribackup/
drwxr-xr-x 2 oracle oinstall 4096 2017-08-21 07:00 /orabackup/ribackup/
yury@svri01:/home/yury $ id oracle
uid=102(oracle) gid=105(oinstall) groups=106(dba),16(dialout),6(disk),49(ftp),105(oinstall),65(sshd),100(users)

when I try to copy archivelog backup to a folder in destination folder, it fails,

export CP="/bin/cp"
export NOHUP="/usr/bin/nohup"
cd /home/oracle/dba/scripts/copy_backup/

"${NOHUP}" "${CP}" /orabackup/ribackup/arch_f2sccg7h_1_1 /u03/app/oracle/formatted_backup/ &

/bin/cp: cannot open `/orabackup/ribackup/arch_f2sccg7h_1_1' for reading: Permission denied

I realize that I might need to change the uid and gid on the destination folder, but from https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=g11m0fps6_135&id=1474891.1

It is not supported to change the UID/GID of Oracle Database Software owner after installation.

Is there anyway that I could configure the destination folder such that oracle interprets uid 102 as oracle and gid 105 as oinstall.

Thanks

Regards, Chun Hung
Re: Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #665058 is a reply to message #665057] Sun, 20 August 2017 20:37 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Root cause & solution have NOTHING to do with Oracle.
Oracle is the victim; not the culprit.
Problem & fix lies strictly at OS level.
OS user does not have necessary OS permissions to complete requested operation

What is result from OS commands below?

ls -ld /orabackup/
ls -l /orabackup/ribackup/arch_f2sccg7h_1_1
Re: Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #665059 is a reply to message #665058] Sun, 20 August 2017 23:03 Go to previous messageGo to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear Black Swan,

From the original server:


drwxrwxrwx 5 root root 4096 2017-08-09 17:38 /orabackup/
yury@svri01:/home/yury $
yury@svri01:/home/yury $ ls -l /orabackup/ribackup/arch_f2sccg7h_1_1
-rw-r----- 1 oracle oinstall 5591570432 2017-08-20 12:05 /orabackup/ribackup/arch_f2sccg7h_1_1
yury@svri01:/home/yury $



[oracle@svritest-vm ~]$ ls -ld /orabackup/
drwxrwxrwx 5 root root 4096 Aug  9 17:38 /orabackup/
[oracle@svritest-vm ~]$ ls -l /orabackup/ribackup/arch_f2sccg7h_1_1
-rw-r----- 1 102 105 5591570432 Aug 20 12:05 /orabackup/ribackup/arch_f2sccg7h_1_1
[oracle@svritest-vm ~]$


Destination server:

[oracle@svritest-vm ~]$ ls -ld /orabackup/
drwxrwxrwx 5 root root 4096 Aug  9 17:38 /orabackup/
[oracle@svritest-vm ~]$ ls -l /orabackup/ribackup/arch_f2sccg7h_1_1
-rw-r----- 1 102 105 5591570432 Aug 20 12:05 /orabackup/ribackup/arch_f2sccg7h_1_1
[oracle@svritest-vm ~]$


It is quite obvious that we don't have permission to read as gid 105 is recognized os 105 and not oinstall at destination folder, which means it will be others in destination server and other mean no permission at all since

-rw-r----- 1 102 105 5591570432 Aug 20 12:05 /orabackup/ribackup/arch_f2sccg7h_1_1

Thanks
Re: Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #665064 is a reply to message #665057] Mon, 21 August 2017 01:15 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
It is the UID/GID that matters, not the username/groupname. Unless you correct them, your only way out will be to set permissions to 777.
Re: Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #665066 is a reply to message #665064] Mon, 21 August 2017 01:27 Go to previous messageGo to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear John,

Can you explain why 777 and not 755? Isn't setting to 777 over excessive, since I'm view as others in the new server and a read will do right? Do I need a write from the destination folder?

Thanks.
Re: Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #665067 is a reply to message #665066] Mon, 21 August 2017 01:54 Go to previous messageGo to next message
Frank Naude
Messages: 4581
Registered: April 1998
Senior Member
777 should be good for testing. Otherwise, try 755 for directories and 644 for files:

find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
Re: Is it required that the gid and uid at the destination server be the same as the source in nfs confi [message #668123 is a reply to message #665067] Thu, 08 February 2018 02:40 Go to previous message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear all,

thanks for your solution.
John is correct it is the UID and GID that matters
Previous Topic: ORA-12012+ORA-00959 + ORA-06512
Next Topic: OracleServiceTMTDB service terminated unexpectedly
Goto Forum:
  


Current Time: Thu Nov 28 11:51:00 CST 2024