I have a computer which is doing shell services for about 20 persons. They all have their disk quota set up properly so I have disabled their access to chown. Btw they should need chown also, so I have written a very simple shell script which controls the situation and changes owner with chown. chown is now owned by the trusted group, the same as the script. The group is able to execute chown... The script is +sgid but I cant execute chown. It says it's permission denied. What am I doing wrong? Praise
On Friday 14 December 2001 17.14, Praise wrote:
The script is +sgid but I cant execute chown.
In Linux you can't set suid or sgid on shell scripts. Well, you can, but the OS won't do anything about it. I would suggest either rewriting the script in a compiled language or using sudo. regards Anders
On Friday 14 December 2001 17.18, Anders Johansson wrote:
On Friday 14 December 2001 17.14, Praise wrote:
The script is +sgid but I cant execute chown.
In Linux you can't set suid or sgid on shell scripts. Well, you can, but the OS won't do anything about it. I would suggest either rewriting the script in a compiled language or using sudo.
regards Anders
One more thing I forgot to mention: chown is hardcoded never to chown anything unless the user running it is uid 0 (root). if you want to let your users chown things, you'll have to make chown suid root. sgid isn't enough. //Anders
participants (2)
-
Anders Johansson
-
Praise