Chinaunix首页 | 论坛 | 博客
  • 博客访问: 353277
  • 博文数量: 38
  • 博客积分: 2432
  • 博客等级: 少校
  • 技术积分: 504
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-20 09:49
个人简介

GBase 8t/Informix数据库技术支持。

文章分类

全部博文(38)

文章存档

2011年(2)

2010年(14)

2009年(11)

2008年(11)

分类:

2008-07-25 10:56:35

AIX5.3中的sar命令不可用,提示:sar: The file access permissions do not allow the specified action.
我们使用truss sar 1 1进行跟踪。发现access("/usr/lib/sa/sadc", 01)                  Err#13 EACCES,查看权限为
% ls -al /usr/lib/sa/sadc
-r-sr-x---   1 root     adm           16170 Apr 27 2006  /usr/lib/sa/sadc
则要使用其他用户能访问sar则应满足1,adm组用户;2,给sadc加上其他用户x权限。两者必选一,为安全方面考虑,建议是将该用户加入到adm组中,编辑/etc/group,把该用户加入到adm组中,该用户即可执行sar.

% sar -d 2 3
sar: The file access permissions do not allow the specified action.
% truss sar 1 1
execve("/usr/bin/sar", 0x2FF22D04, 0x2FF22D14)   argc: 3
sbrk(0x00000000)                                = 0x20003A88
vmgetinfo(0x2FF21580, 7, 16)                    = 0
sbrk(0x00000000)                                = 0x20003A88
sbrk(0x00000008)                                = 0x20003A88
__libc_sbrk(0x00000000)                         = 0x20003A90
getuidx(4)                                      = 500
getuidx(2)                                      = 500
getuidx(1)                                      = 500
getgidx(4)                                      = 101
getgidx(2)                                      = 101
getgidx(1)                                      = 101
__loadx(0x01000080, 0x2FF21040, 0x00000960, 0x2FF21AC0, 0x00000000) = 0xD0149130
__loadx(0x01000180, 0x2FF21040, 0x00000960, 0xF0428DC4, 0xF0428CF4) = 0xF0282438
__loadx(0x07080000, 0xF0428D94, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF0283368
__loadx(0x07080000, 0xF0428CD4, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF0283374
__loadx(0x07080000, 0xF0428DA4, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF02833A4
__loadx(0x07080000, 0xF0428CE4, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF02833B0
__loadx(0x07080000, 0xF0428D64, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF0283380
__loadx(0x07080000, 0xF0428D04, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF0283398
__loadx(0x07080000, 0xF0428D74, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF02833BC
__loadx(0x07080000, 0xF0428D84, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF02833EC
__loadx(0x07080000, 0xF0428D14, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF02833D4
__loadx(0x07080000, 0xF0428D24, 0xFFFFFFFF, 0xF0282438, 0x00000000) = 0xF0283470
getuidx(4)                                      = 500
getuidx(2)                                      = 500
getuidx(1)                                      = 500
getgidx(4)                                      = 101
getgidx(2)                                      = 101
getgidx(1)                                      = 101
__loadx(0x01000080, 0x2FF21040, 0x00000960, 0x2FF21AC0, 0x00000000) = 0xD0149130
getuidx(4)                                      = 500
getuidx(2)                                      = 500
getuidx(1)                                      = 500
getgidx(4)                                      = 101
getgidx(2)                                      = 101
getgidx(1)                                      = 101
__loadx(0x01000080, 0x2FF21040, 0x00000960, 0x2FF21AC0, 0x00000000) = 0xD0149130
getuidx(4)                                      = 500
getuidx(2)                                      = 500
getuidx(1)                                      = 500
getgidx(4)                                      = 101
getgidx(2)                                      = 101
getgidx(1)                                      = 101
__loadx(0x01000080, 0x2FF21040, 0x00000960, 0x2FF21AC0, 0x00000000) = 0xD0149130
getuidx(4)                                      = 500
getuidx(2)                                      = 500
getuidx(1)                                      = 500
getgidx(4)                                      = 101
getgidx(2)                                      = 101
getgidx(1)                                      = 101
__loadx(0x01000080, 0x2FF21040, 0x00000960, 0x2FF21AC0, 0x00000000) = 0xD0149130
getuidx(4)                                      = 500
getuidx(2)                                      = 500
getuidx(1)                                      = 500
getgidx(4)                                      = 101
getgidx(2)                                      = 101
getgidx(1)                                      = 101
__loadx(0x01000080, 0x2FF21040, 0x00000960, 0x2FF21AC0, 0x00000000) = 0xD0149130
access("/usr/lib/nls/msg/en_US/sar.cat", 0)     = 0
_getpid()                                       = 147786
access("/usr/lib/sa/sadc", 01)                  Err#13 EACCES
access("/usr/lib/nls/msg/en_US/libc.cat", 0)    = 0
_getpid()                                       = 147786
open("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 3
kioctl(3, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
kfcntl(3, F_SETFD, 0x00000001)                  = 0
kioctl(3, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
kread(3, "\0\001 ù\007\007 I S O 8".., 4096)    = 4096
lseek(3, 0, 1)                                  = 4096
lseek(3, 0, 1)                                  = 4096
lseek(3, 0, 1)                                  = 4096
_getpid()                                       = 147786
lseek(3, 0, 1)                                  = 4096
close(3)                                        = 0
sarkwrite(2, " s a r", 3)                               = 3
: kwrite(2, " :  ", 2)                          = 2
The file access permissions do not allow the specified action.kwrite(2, " T h e   f i l e   a c c".., 62)       = 62

kwrite(2, "\n", 1)                              = 1
kfcntl(1, F_GETFL, 0x2FF22FFC)                  = 2
kfcntl(2, F_GETFL, 0x00000000)                  = 2
_exit(1)
阅读(2660) | 评论(2) | 转发(2) |
给主人留下些什么吧!~~

xjjjk2010-04-21 11:47:48

http://bbs.chinaunix.net/viewthread.php?tid=1693623&page=1&extra=#pid12090542

xjjjk2010-04-21 11:46:56

我也遇到了在aix 5.3下设置kill命令给普通用户执行的问题,按你的方法操作了,现在还没有解决;