On 2002.01.07, at 23:36, [EMAIL PROTECTED] wrote:

> This brings up a question about permissions ...
>
> So a script (or any executable, such as a perl script written for cgi)
> cannot be run by anyone other than root, if it was created by root? I 
> mean,
> root can't give permission for a root-owned script to be world 
> executable,
> even if the administrator wanted to? While I can see how doing that 
> would
> be a very bad idea, in terms of security, I'm just asking in order to 
> learn
> more about linux file permissions.

No, you should not confuse permissions and ownership.
Ownership and permissions are independent. When
you run ls -al from the shell, you have the permission string
first and then the owner and the group.

As root, you can allow anybody to run anything. Suppose
your script is called rootownedscript, you can allow anybody to run
it by typing chmod o+x rootownedscript (o means other, x means
execute, therefore chmod o+x = make executable for other).
Well, if you read the manual (type man chmod from a terminal),
you will know everything about chmod.

But as a warning, be careful to what you allow to your users...
I wouldn't recommend to allow diskdrake or other funny tools to
be allowed to all users...

> I had written a perl cgi script, and it wouldn't run from the web page, 
> as
> it turns out because I had created it as root.

Then chmod o+x your_script.

Pascal


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to