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.


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.


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@ "/usr/sfw/bin/gtar -xp -C /u04/oradata/hrspec "

or you can use POSIX ACLs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy