Cannot change permissions from rwx to rws

Issues related to applications and software problems
Post Reply
mmuadmin
Posts: 5
Joined: 2015/06/29 10:00:13

Cannot change permissions from rwx to rws

Post by mmuadmin » 2015/06/29 10:13:57

Hello,

Version: CentOS release 6.6 (Final) - x86_64 GNU/Linux

I am not able to change the file permission from rwx to rws for root user. Please go through my try below.

sh-4.1# cat /etc/centos-release
CentOS release 6.6 (Final)
sh-4.1# cd /Oms/agent/sbin
sh-4.1# ls -lrt
-rwxr-xr-x 1 root dba 41060 Jun 29 09:49 nmo
-rwx--x--- 1 root dba 57835 Jun 29 09:49 nmhs
-rwx--x--- 1 root dba 22754 Jun 29 09:49 nmb
-rwxr-xr-x 1 root dba 585242 Jun 29 09:49 nmosudo
-rwxr-xr-x 1 root dba 43494 Jun 29 09:49 nmgsshe
-rwxr-xr-x 1 root dba 585242 Jun 29 09:49 nmopdpx
sh-4.1# chmod 4755 nmo
sh-4.1# ls -lrt
-rwxr-xr-x 1 root dba 41060 Jun 29 09:49 nmo
-rwx--x--- 1 root dba 57835 Jun 29 09:49 nmhs
-rwx--x--- 1 root dba 22754 Jun 29 09:49 nmb
-rwxr-xr-x 1 root dba 585242 Jun 29 09:49 nmosudo
-rwxr-xr-x 1 root dba 43494 Jun 29 09:49 nmgsshe
-rwxr-xr-x 1 root dba 585242 Jun 29 09:49 nmopdpx


As you can see , the command 4755 didnt work here. Permissions are not changed to rws from rwx. Do we need to change any of setting in the unix ?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Cannot change permissions from rwx to rws

Post by gerald_clark » 2015/06/29 14:56:40

What is Oms?
What is the output of 'uname -a' ?

mmuadmin
Posts: 5
Joined: 2015/06/29 10:00:13

Re: Cannot change permissions from rwx to rws

Post by mmuadmin » 2015/06/30 11:03:40

Oms is the abbreviation of Oracle Management system. Here it is just the name of file system.

this is the op of uname -a

[oracle@OMS1 bin]$ uname -a
Linux OMS1.mmu.ac.uk 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Cannot change permissions from rwx to rws

Post by gerald_clark » 2015/06/30 13:00:45

Sounds like a question for Oracle.

mmuadmin
Posts: 5
Joined: 2015/06/29 10:00:13

Re: Cannot change permissions from rwx to rws

Post by mmuadmin » 2015/07/01 10:27:53

I Raised the same question to oracle and they replied this is an issue with the OS setup.

Permissions are not changing even if you create a text file.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot change permissions from rwx to rws

Post by TrevorH » 2015/07/01 10:33:06

Is that directory on a local filesystem? What filesystem is it using? I just tested here on 6.6 and get

Code: Select all

[root@trevor4 t]# touch t.txt
[root@trevor4 t]# ls -l t.txt 
-rw-r--r--. 1 root root 0 Jul  1 11:32 t.txt
[root@trevor4 t]# chmod 4755 t.txt 
[root@trevor4 t]# ls -l t.txt 
-rwsr-xr-x. 1 root root 0 Jul  1 11:32 t.txt
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Cannot change permissions from rwx to rws

Post by MartinR » 2015/07/01 12:26:05

I have also trialled it (/tmp/Oms/agent/nmo) and had no problems. Are you using su to get into root, and if so are you using su -? If the dash is missed off you will get environment issues. Another thing to check: is the filesystem read-only?

mmuadmin
Posts: 5
Joined: 2015/06/29 10:00:13

Re: Cannot change permissions from rwx to rws

Post by mmuadmin » 2015/07/02 07:51:54

Hi Trevor,

This is a NFS file system

mmuadmin
Posts: 5
Joined: 2015/06/29 10:00:13

Re: Cannot change permissions from rwx to rws

Post by mmuadmin » 2015/07/02 07:53:12

@Martin..

Thanks for your reply. I am not using su, i am directly logging as root.

This is a NFS file system, do we smell something in this?

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Cannot change permissions from rwx to rws

Post by MartinR » 2015/07/02 08:57:13

Have you got no_root_squash set in the exports file (or its equivalent)? Alternatively, look out for all_squash. If root is squashed (or all are), then it is converted to the anonymous user and will be using "others" permissions.

Post Reply