Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On a Solaris machine I need to transfer files from windows to unix server as well as server to server. Is there a way to get the oracle id permissions (uid gid) when I do this here is an example :

My id Brian using winscp transfers a file to my unix server DBserv1 to directory /u04/oradata/hrspec Files have the following

-rw-r--r--   1 oracle   orainst   573440 Jul 20  2010 system_01.dbf 

Right now I would have to copy the file then change chmod to 655 then chown to oracle.

Logging in with the oracleid is not permitted.

share|improve this question

2 Answers 2

I'm not sure I completely understand your question, but you should probably use tar or rsync to be able to preserve UID, GID and permissions during a file transfer.

share|improve this answer

when you use scp command, new files inherit your uid and gid. You can use something like this to preserve owner:

/usr/sfw/bin/gtar -cpvf - system_01.dbf  | \
     ssh root@172.16.138.15 "/usr/sfw/bin/gtar -xp -C /u04/oradata/hrspec "

or you can use POSIX ACLs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.