LINUX中 设置了umask 创建的默认文件和目录的权限

LINUX中  设置了umask  创建的默认文件和目录的权限

 

 

LINUX中  设置了umask  创建的默认文件和目录的权限

普通文件默认是644 也就是:
-rw-r--r-- 1 root root 0 May15 20:04 test
自已有读写(rw),同组人员有读(r),其它有读(r)
默认权限可通过umask 修改
默认umask 为022
文件:666 - 022 = 644
目录:777 - 022 = 755
如果你下了umask 011 的指令,则生成的文件目录权限就变成:
文件:666 - 011 = 655
目录:777 - 011 = 766


修改  .bash_profile 文件就可以了

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
 . ~/.bashrc
fi

# User specific environment and startup programs

alias ls='ls -CF'
PS1='SZDATA_suheadof:$PWD> '; export PS1
umask 022                                                        #########就是这个问题
set -o vi
stty intr '^c'
stty -istrip

TERM=vt220;  export TERM
EDITOR=vi;   export EDITOR
TEMP=/tmp;   export TEMP
TMPDIR=/tmp; export TMPDIR

### SETUP ORACLE ENVIRONMENT ###
ORACLE_SID=ora10; export ORACLE_SID
ORACLE_BASE=/home/oracle;                    export ORACLE_BASE
ORACLE_HOME=/home/oracle/product/10.2.0;     export ORACLE_HOME
ORACLE_TERM=ansi;                            export ORACLE_TERM
JAVA_FONTS=/usr/share/fonts/zh_CN/TrueType/; export JAVA_FONTS
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;          export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
##CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$HOME/tomcat5/common/lib/classes12.jar:$HOME/bea/weblogic81/common/lib/classes12.jar
##CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
##export CLASSPATH

PATH=.:/usr/local/ant/bin:$ORACLE_HOME/bin:$PATH
export PATH

### FOR ORACLE INSTALL ###
#export LC_ALL="en_US"
#export LC="en_US"

### FOR JAVA ###
#JAVA_HOME=/usr/local/jdk1.5.0; export JAVA_HOME
#JAVA_HOME=/usr/local/j2sdk1.4.2_04; export JAVA_HOME
#PATH=$JAVA_HOME/bin:$PATH
#CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:/usr/local/tomcat5/common/lib/classes12.jar:/usr/local/tomcat5/common/lib/jsp-api.jar:/usr/local/tomcat5/common/lib/servlet-api.jar  export CLASSPATH
### TOMCAT ###
#CATALINA_HOME=/home2/headof/maintain/apache-tomcat-6.0.2; export CATALINA_HOME
#CATALINA_HOME=/usr/local/tomcat5; export CATALINA_HOME
#JBOSS_HOME=/usr/local/jboss;      export JBOSS_HOME
MS_SHELL=/home/nr/shell;          export MS_SHELL

#ANT_HOME=/usr/local/apache-ant-1.7.0; export ANT_HOME
#PATH=$PATH:$ANT_HOME/bin;     export PATH

# Developers variables:
SU_DIR=/home2/headof/maintain;    export SU_DIR
PATH=$PATH:$SU_DIR; export PATH

MS_SHELL=/home/nr/shell;                        export MS_SHELL
MS_SEND=/tmp;                                   export MS_SEND
MS_SEMA=/tmp/sema.basis;                        export MS_SEMA
MS_NIGHTRUN=/tmp/nr.ho.basis;                   export MS_NIGHTRUN
MS_LIST=/home2/headof;                          export MS_LIST
MS_COMM=/home2/headof;   

你可能感兴趣的:(java,oracle,linux,Path,library,variables)