首页 技术 正文
技术 2022年11月20日
0 收藏 769 点赞 4,154 浏览 1673 个字

客户需求,由于ftp服务器权限管理需要,测试能否通过修改oracle umask值,达到expdp导出文件权限,导出即是想要的权限。

Session
[oracle@adg1 ~]$ umask[oracle@adg1 ~]$ umask -S
u=rwx,g=rx,o=rx 修改umask值
[oracle@adg1 ~]$ umask
[oracle@adg1 ~]$ umask -p
umask
[oracle@adg1 ~]$ touch a.txt
-rw-r--r-- oracle oinstall - : test.txt
-rw-r----- oracle oinstall - : a.txt --文件权限已换
-rw-r--r-- oracle oinstall - : b.txtSession 使用umask修改,只在当前session生效
[oracle@adg1 ~]$ umasktouch c.txt
[oracle@adg1 ~]$ ls -lrt c.txt
-rw-r--r-- oracle oinstall Aug : c.txt使用数据泵进行导出expdp一个表
$ expdp \'/ as sysdba\' directory=dd dumpfile=emp1.dump logfile=emp%U.log tables=scott.emp
[oracle@adg1 dump]$ ls -lrt
total
-rw-r----- oracle oinstall Aug : emp1.dump
-rw-r--r-- oracle oinstall Aug : emp%U.log修改umask值
https://blog.csdn.net/yangzhengquan19/article/details/83055686
umask
[oracle@adg1 dump]$ touch test.txt
[oracle@adg1 dump]$ ls -lrt test.txt
-rw------- oracle oinstall Aug : test.txt$ expdp \'/ as sysdba\' directory=dd dumpfile=emp2.dump logfile=emp%U.log tables=scott.emp
-rw-r----- oracle oinstall Aug : emp2.dump
-rw-r--r-- oracle oinstall Aug : emp%U.log 并未生效!SQL> create pfile='/11.2.0.4/app/oracle/dump/pfile.ora' from spfile;
-rw------- oracle oinstall Aug : pfile.ora !!! sqlplus 登陆创建的文件生效了,但是使用数据泵导出的文件未受到影响。[oracle@adg1 ~]$ vi .bash_profile
PATH=$PATH:$HOME/bin
umask
export PATH
[oracle@adg1 ~]$ umask[oracle@adg1 ~]$ touch a.txt
[oracle@adg1 ~]$ ls -lrt
-rw------- oracle oinstall Aug : a.txt
$ expdp \'/ as sysdba\' directory=dd dumpfile=emp3.dump logfile=emp%U.log tables=scott.emp
-rw-r----- oracle oinstall Aug : emp3.dump
无效果 修改用户!!$ expdp \'/ as sysdba\' directory=dd dumpfile=emp4.dump logfile=emp%U.log tables=scott.emp
-rw------- oracle oinstall Aug : emp4.dump汇总: 1.修改umask值,只再当前session 生效,使用sqlplus创建pfile权限可以进行调整,但是expdp并不生效;
2.修改用户umask值,重启db生效,但是所有文件收到影响,影响太大;
3.建议使用shell脚本,对expdp导出的文件,进行脚本化封装chmod,chown修改,以达到目的
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,086
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,561
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,410
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,183
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,820
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,903