Hi,
I have problem to run script with sudo as user "ttadmin". The user is owner of the file, the permissions should be set correctly, but still "Permision denied".
I have no idea where the root problem lies. Can someone help?
System description:
Code:
[user@server ~]$ uname -a
Linux server 2.6.32-431.29.2.el6.x86_64 #1 SMP Sun Jul 27 15:55:46 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[user_at_server ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Problem:
Code:
[root_at_server linux8664]# sudo -u ttadmin /var/broadworks/tmp/tt/linux8664/setup.sh
sudo: unable to execute /var/broadworks/tmp/tt/linux8664/setup.sh: Permission denied
Running script as root user works:
Code:
[root_at_server linux8664]# ./setup.sh
WARNING: You are about to install TimesTen as root. TimesTen daemon processes will
run with root privileges. See the TimesTen Installation Guide for additional
information.
Are you sure that you want to install as root? [ no ] no
System configuration check output:
Code:
[root_at_server ~]# ls -ltr /var/broadworks/tmp/tt/linux8664/
total 412
-rwxr-xr-x 1 ttadmin bwadmin 34886 May 23 2013 uninst.sh
-rwxr-xr-x 1 ttadmin bwadmin 5623 May 23 2013 setup.sh
-rwxr--r-- 1 ttadmin bwadmin 114937 May 23 2013 README.html
drwxr-xr-x 2 ttadmin bwadmin 4096 Sep 27 2013 LINUX8664
-rwxr-xr-x 1 ttadmin bwadmin 245007 Sep 27 2013 install.pl
[root_at_server linux8664]# lsattr
--------------- ./setup.sh
--------------- ./LINUX8664
--------------- ./install.pl
--------------- ./README.html
--------------- ./uninst.sh
[root_at_server linux8664]# getfacl setup.sh
# file: setup.sh
# owner: ttadmin
# group: bwadmin
user::rwx
group::r-x
other::r-x
[root_at_server linux8664]# ls -Z
-rwxr-xr-x ttadmin bwadmin ? install.pl
drwxr-xr-x ttadmin bwadmin ? LINUX8664
-rwxr--r-- ttadmin bwadmin ? README.html
-rwxr-xr-x ttadmin bwadmin ? setup.sh
-rwxr-xr-x ttadmin bwadmin ? uninst.sh
[root_at_server linux8664]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#enforcing - SELinux security policy is enforced.
#permissive - SELinux prints warnings instead of enforcing.
#disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#targeted - Only targeted network daemons are protected.
#strict - Full SELinux protection.
SELINUXTYPE=targeted
[root_at_server linux8664]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Tue Jul 15 10:59:30 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VG_LOCAL_STORAGE-LV_ROOT / ext3 defaults 1 1
UUID=280a06e3-47ad-4643-8ece-859a87cdfa8f /boot ext3 defaults 1 2
/dev/mapper/VG_LOCAL_STORAGE-LV_TMP /tmp ext3 defaults 1 2
/dev/mapper/VG_LOCAL_STORAGE-LV_VAR /var ext3 defaults 1 2
/dev/mapper/VG_LOCAL_STORAGE-LV_LOG /var/log ext3 defaults 1 2
/dev/mapper/VG_LOCAL_STORAGE-LV_VOL1 /vol1 ext3 defaults 1 2
UUID=a973d42e-407b-40ad-9a8c-b17abfc7c32c swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
[root_at_server linux8664]# cat /etc/mtab
/dev/mapper/VG_LOCAL_STORAGE-LV_ROOT / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/sda1 /boot ext3 rw 0 0
/dev/mapper/VG_LOCAL_STORAGE-LV_TMP /tmp ext3 rw 0 0
/dev/mapper/VG_LOCAL_STORAGE-LV_VAR /var ext3 rw 0 0
/dev/mapper/VG_LOCAL_STORAGE-LV_LOG /var/log ext3 rw 0 0
/dev/mapper/VG_LOCAL_STORAGE-LV_VOL1 /vol1 ext3 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
Thanks