当前位置: 代码迷 >> AIX >> 很奇怪的文件用户所属有关问题
  详细解决方案

很奇怪的文件用户所属有关问题

热度:3098   发布时间:2013-02-26 00:00:00.0
很奇怪的文件用户所属问题
我将下面所列出来的 .profile 文件所属的用户该为了db2cred用户,但是在db2cred用户下却不能执行,可是在另一个用户下却可以执行,请问是怎么回事?下面是文件所属用户及组,以及文件的可执行权限列表:

db2inst:/db2home/db2cred>ls -la
total 144
drwxr-sr-x 7 db2cred db2admin 512 Mar 04 2005 .
drwxr-sr-x 12 db2inst sys 512 Feb 03 2004 ..
-rw------- 1 db2cred db2admin 3408 Apr 09 2004 .TTauthority
-rw------- 1 db2cred db2admin 0 Mar 04 2005 .Xauthority
drwxr-sr-x 10 db2cred db2admin 512 Mar 04 2005 .dt
-rwxr-xr-x 1 db2cred db2admin 3970 Apr 22 2003 .dtprofile

-rwxr----- 1 db2cred db2admin 5113 May 13 2003 .profile
-rw------- 1 db2cred db2admin 2520 Mar 14 18:53 .sh_history
drwxr-sr-x 2 db2cred db2admin 512 Apr 22 2003 TT_DB
-rw-r----- 1 db2cred db2admin 12529 May 08 2003 crttab.sql
drwxrwsr-x 3 db2cred db2admin 512 May 08 2003 db2cred
drwxrwx--- 2 db2cred db2admin 512 Apr 22 2003 lost+found
-rw-r--r-- 1 db2cred db2admin 3963 May 08 2003 smit.log
-rw-r--r-- 1 db2cred db2admin 732 Apr 22 2003 smit.script
drwxrwsr-t 15 db2cred db2admin 1024 Mar 14 15:32 sqllib
db2inst:/db2home/db2cred>. .profiledb2inst:/db2home/db2cred>


可是在db2cred用户下却提示发现不了 .profile 文件,如下所示:db2cred:/db2home/db2cred>ls -la
total 144
drwxr-sr-x 7 db2cred db2admin 512 Mar 04 2005 .
drwxr-sr-x 12 db2inst sys 512 Feb 03 2004 ..
-rw------- 1 db2cred db2admin 3408 Apr 09 2004 .TTauthority
-rw------- 1 db2cred db2admin 0 Mar 04 2005 .Xauthority
drwxr-sr-x 10 db2cred db2admin 512 Mar 04 2005 .dt
-rwxr-xr-x 1 db2cred db2admin 3970 Apr 22 2003 .dtprofile
-rwxr----- 1 db2cred db2admin 5113 May 13 2003 .profile-rw------- 1 db2cred db2admin 2528 Mar 14 19:26 .sh_history
drwxr-sr-x 2 db2cred db2admin 512 Apr 22 2003 TT_DB
-rw-r----- 1 db2cred db2admin 12529 May 08 2003 crttab.sql
drwxrwsr-x 3 db2cred db2admin 512 May 08 2003 db2cred
drwxrwx--- 2 db2cred db2admin 512 Apr 22 2003 lost+found
-rw-r--r-- 1 db2cred db2admin 3963 May 08 2003 smit.log
-rw-r--r-- 1 db2cred db2admin 732 Apr 22 2003 smit.script
drwxrwsr-t 15 db2cred db2admin 1024 Mar 14 15:32 sqllib
db2cred:/db2home/db2cred>. .profile
ksh: .profile: not found.db2cred:/db2home/db2cred>





------解决方案--------------------------------------------------------
探讨
那是你的环境PATH 没有包含当前路径
export PATH=$PAHT:.
  相关解决方案