Права на каталоги SAP в Linux

В примере SM1 — SID системы

Можно использовать скрипты saproot.sh and oraroot.sh выставляющие нужные права или раздать их вручную:

 

Чтобы работал brtools и db13:

chown orasm1:sapsys /sapmnt/SM1/exe/brarchive
chown orasm1:sapsys /sapmnt/SM1/exe/brbackup
chown orasm1:sapsys /sapmnt/SM1/exe/brconnect
chown sm1adm:sapsys /sapmnt/SM1/exe/brrecover
chown sm1adm:sapsys /sapmnt/SM1/exe/brrestore
chown sm1adm:sapsys /sapmnt/SM1/exe/brspace
chown sm1adm:sapsys /sapmnt/SM1/exe/brtools
chmod 4774 /sapmnt/SM1/exe/brarchive
chmod 4774 /sapmnt/SM1/exe/brbackup
chmod 4774 /sapmnt/SM1/exe/brconnect
chmod 755 /sapmnt/SM1/exe/brrestore
chmod 755 /sapmnt/SM1/exe/brrecover
chmod 755 /sapmnt/SM1/exe/brspace
chmod 755 /sapmnt/SM1/exe/brtools

 

Пример:

-rwsrwxr--  1 orasid   sapsys    10022600 Aug 23 2012  brarchive
-rwsrwxr--  1 orasid   sapsys    10251536 Aug 23 2012  brbackup
-rwsrwxr--  1 orasid   sapsys    12179560 Aug 23 2012  brconnect
-rwxr-xr-x  1 sidadm   sapsys    10708840 Aug 23 2012  brrecover
-rwxr-xr-x  1 sidadm   sapsys     4140576 Aug 23 2012  brrestore
-rwxr-xr-x  1 sidadm   sapsys    12778384 Aug 23 2012  brspace
-rwxr-xr-x  1 sidadm   sapsys     4711664 Aug 23 2012  brtools

 

 


 

113747 - Owners and authorizations for BR*Tools

Solution

The following settings are required to call the BR*Tools correctly, especially when using transaction DB13 or DBACOCKPIT:

(1)
ora<sid> and <sid>adm on DB server have a search path on /sapmnt/<SID>/exe. (All br* are contained in this directory.)
ora<sid> belongs to the dba group,
<sid>adm belongs to the sapsys group,

(2)
<sid>adm on the database server has the rhosts entry: "+ <sid>adm".

(3)
The Oracle user ops$<sid>adm must be created in the DB and must have the role sapdba (not DBA) (see SAP Note 134592 for more information).

(4)
brarchive, brbackup, and brconnect belong to ora<sid> and have authorization 4774:
-rwsrwxr--   ora<sid>   sapsys   ...

Reason:
Both the operating system (OS) user ora<sid> and the OS user <sid>adm (for example, from SAP R/3, transactions DB13 or DBACOCKPIT) must be able to call these tools. These tools require access authorization to the database directories and files as well as to the log directories (saparch, sapbackup, sapcheck, and sapreorg) of the BR*Tools. To ensure that they can be executed by both ora<sid> and by <sid>adm, they must belong to the user ora<sid>, and the s-bit must be set.

(5)
brrestore, brrecover, brspace, and brtools belong to <sid>adm and have authorization 755:
-rwxr-xr-x   <sid>adm   sapsys   ...

Reason:
These tools may be used only by OS user ora<sid>, but not by <sid>adm. This ensures that the user <sid>adm does not have write permission for the log directories and therefore cannot create any logs. For this, no s-bit is set, and it is not necessary to define an owner other than the standard owner <sid>adm.
If the tools were started using <sid>adm, they would terminate immediately after the start due to the missing log authorization. However, the user ora<sid> can start the programs despite this and also has the required authorization for the log directories.

For example:
-rwsrwxr--  1 orasid   sapsys    10022600 Aug 23 2012  brarchive
-rwsrwxr--  1 orasid   sapsys    10251536 Aug 23 2012  brbackup
-rwsrwxr--  1 orasid   sapsys    12179560 Aug 23 2012  brconnect
-rwxr-xr-x  1 sidadm   sapsys    10708840 Aug 23 2012  brrecover
-rwxr-xr-x  1 sidadm   sapsys     4140576 Aug 23 2012  brrestore
-rwxr-xr-x  1 sidadm   sapsys    12778384 Aug 23 2012  brspace
-rwxr-xr-x  1 sidadm   sapsys     4711664 Aug 23 2012  brtools

Note 1:
On Linux and Solaris 11, you have to adjust the authorization for brarchive, brbackup, and brconnect manually if you want to create RMAN backups with the OS user <sid>adm. For more information, see SAP Note 776505.

Note 2:
Other BR*Tool authorizations apply for Oracle installations with the OS user oracle. For more information, see SAP Note 1598594.