W dniu 01.04.2021 o 22:01, Robert Hahne pisze:
Greetings ,
Is there a way a user can be allowed to execute a unix shell script in batch
without changing the file permission bits or granting SUPERUSER authority ?
Currently the file has got 700 and the user is not the owner of the file . Any
suggestions would be great
Short answer: NO.
Longer answer: No. :-) Even superuser cannot execute script which is not
marked as x (executable). Of course superuser can change it using chmod
command.
However this is a script - some text file. Even regular user can run it
- assuming he have r right he can copy the script to other file and
chmod the file to x. Of course it doesn't mean the user will have
intended authorities and sometimes script have relative paths in the
code, so it won't work correctly without modifications.
In your case the user has 0 (---) authorities - than means zero. Nothing.
Fine print: the above is NOT TRUE :-)
We don't know all the true, because we don't know the path and
authorities. 700 is enough to delete the file assuming the user has
WRITE to the directory. He can't read it, he can't execute it, he can't
write it, bu he can delete it. It is more than nothing.
--
Radoslaw Skorupka
(looking for new job)
Lodz, Poland
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN