Click to See Complete Forum and Search --> : setuid problems...
ScRapZ_1
03-08-2001, 07:00 AM
Just a quikkie...
When I try to setuid a file (we'll call it "file") for example chmod 4755 file I get:
chmod: file: Operation not permitted
...now I find this funny seen as Im logged in as root, and I'm supposedly "god" of the box, and it wont let me do a simple thing like that!?!!?
Any help?
TTFN,
ScRapZ_1 :p
yard21
03-08-2001, 07:23 AM
Try to set the setuid by typing "chmod +s filename
ScRapZ_1
03-08-2001, 07:53 AM
No go... still the same problem
BUMP!
Pierre Lambion
03-08-2001, 07:56 AM
Does this happen on any file or only on a specific one?
P.
ScRapZ_1
03-08-2001, 08:12 AM
Ive only had to try it on two files that I downloaded, but gimme a sec...
...hmmm, it seems that I can do it to, say, a file I typed up myself. Hangon, I know what you're going to say... "chown root file", I already ahead of you... and it STILL wont work.
So I cant setuid the files I've downloaded...
TTFN,
ScRapZ_1 :p
Pierre Lambion
03-08-2001, 08:40 AM
What if you duplicate the file (maybe with umask 000 before the cp)? Is the new file still rebel to chmod?
Are those downloads complete. Maybe those are un-complete, corrupted files.
P.
ScRapZ_1
03-08-2001, 08:59 AM
...ahem.
Silly me trying to do it from a mounted drive. Copied it over to /usr/local/folder and it worked first time. :rolleyes:
Unfortunatly, that brings me to my next question of neverending annoying questions. Probably something as obvious as the last one, but not from what I can see.
I try to _run_ the file, first by going to the dir it lives in, (ie: /usr/local/folder) and trying to execute it (ie: ./file) and it comes back saying:
bash: ./file: No such file or directory
I can see it, ls it, edit it, do stuff to it... but not execute it. It apparently doesnt exist when I try...
I hope its not as blatenly obvious as my lst stuff up. :D
TTFN,
ScRapZ_1 :p
Pierre Lambion
03-08-2001, 09:14 AM
Is it market as executable? Is it a script with a she-bang (#!/bin/bash or perl, ...).
If so, is the she-bang correct for your system?
It could also be a script calling another program, not present on your system.
P.
ScRapZ_1
03-08-2001, 09:23 AM
Its marked as executable.
I dont know what it is, but if I view it with the view program in X or with vi, the first 3 letters are ELF.
Dont know if that helps, but I might give up after this... getting bald at to early an age. :D
TTFN,
ScRapZ_1 :p
Pierre Lambion
03-08-2001, 10:14 AM
ELF is an old binary format taht should be supported on any linux distribution, AFAIK.
I don't know why he is bugging ...
Sorry.
P.