Operating System - HP-UX
1820733 Members
3172 Online
109627 Solutions
New Discussion юеВ

chmod u+s not working good?

 
SOLVED
Go to solution
uadm26
Super Advisor

chmod u+s not working good?

Hi,

When i try to cahnge a file permissions, setting the setid (+s) by root that's what append, appears the letter "S", not the "s", in lower case. Why?

root@beta5:/tmp/testes# chmod u+s tt
root@beta5:/tmp/testes# ll
total 2
-rwSr--r-- 1 root sys 54 Sep 6 14:26 tt
root@beta5:/tmp/testes#
6 REPLIES 6
Patrick Wallek
Honored Contributor
Solution

Re: chmod u+s not working good?

The file needs to have the execute (x) bit set before you set the set-uid bit. Try this instead:

# chmod 4744 tt
RAC_1
Honored Contributor

Re: chmod u+s not working good?

chmod 4766 file_name
There is no substitute to HARDWORK
Pete Randall
Outstanding Contributor

Re: chmod u+s not working good?

There's no execute permission set.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: chmod u+s not working good?

Hi Joel:

The capital letter "S" means that the execute bit isn't set for the owner but the setuid bit is. Do:

chmod 4544 to your file to see a change from the capital "S" to a lowercase "s".

Regards!

...JRF...

Steven E. Protter
Exalted Contributor

Re: chmod u+s not working good?

Two suggestions:

1) Make sure there is no process with a filehandle on that file. I got those results when a daemon had a constant hold on a file. The daemon was unfortuneately owned by root.

2) Perhaps try the chmod command numeric instead of by letters. chmod 7xxx or 5xxx the letters in my example are the normal file permissions.

I got the same results as you on a Linux machine(my HP-9000 is shut for noise reasons).

Chmod 7555 worked and produced possibly desireable results.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
uadm26
Super Advisor

Re: chmod u+s not working good?

thanks, for all.