You are not logged in.

#1 2007-04-16 16:50:17

djidji
Member
Registered: 2007-02-26
Posts: 57

where are setuid and setgid

is there a package that has to be installed for setuid and setgid?

Offline

#2 2007-04-16 21:40:26

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: where are setuid and setgid

SUID: chmod u+s file
SGID: chmod g+s file

Last edited by Ramses de Norre (2007-04-16 21:40:46)

Offline

#3 2007-04-16 23:02:12

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: where are setuid and setgid

The file must have the execute bit set as well!
chmod u+x file
or
chmod g+x file

For example:

[dan@cylon ~]$ ls -l tmp
-rw-r--r-- 1 dan dan 0 2007-04-16 18:57 tmp

Make the file setuid:

[dan@cylon ~]$ chmod u+s tmp

A listing shows that the setuid bit is set, but the uppercase 'S' indicates the execute permission is missing:

[dan@cylon ~]$ ls -l tmp
-rwSr--r-- 1 dan dan 0 2007-04-16 18:57 tmp

So,

[dan@cylon ~]$ chmod u+x tmp

Now the lowercase 's' is what you want.

[dan@cylon ~]$ ls -l tmp
-rwsr--r-- 1 dan dan 0 2007-04-16 18:57 tmp

Offline

#4 2007-04-17 14:50:50

djidji
Member
Registered: 2007-02-26
Posts: 57

Re: where are setuid and setgid

thanks for that clarification

Offline

Board footer

Powered by FluxBB