Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: kadybee on September 14, 2004, 03:09:20 PM

Title: edit web panel cgi
Post by: kadybee on September 14, 2004, 03:09:20 PM
I am attempting to edit a web/panels/user/cgi-bin script.

I just want to change a small bit of default text in the vacation messages of the userpanel add-on.

No matter what I do in editing, it 'breaks' the cgi action - even just 'touching' the file .. so I know it's not syntax errors etc.

I get the error:

The server encountered an internal error or misconfiguration and was unable to complete your request.  (etc)

I am assuming there is some protection to certain file changes.  Can anyone offer clues to overcome this?  It is not a template .. that would be easy :-(



Thanks

Klaus
Title: edit web panel cgi
Post by: smeghead on September 23, 2004, 04:55:17 PM
If you look at the files in the folder they are all symbolic links to the actual files in /etc/e-smith/web/functions; edit the files here.

These files are REALLY sensitive about being worked on so before doing anything run ls -la in this folder and you will see a listing that displays the full ownership and permissions settings, on my server a single entry looks like:

-rwsr-x---    1 root     admin       40010 Sep  8  2003 advworkgroup

Now if you edit the file it have some of its permissions and ownership settings changed.

So do the following:

a) Note the EXACT ownership & perms on the file that is to be changed (note the 's' in the listing refers to the SetUID sticky bit, its not a typo)
b) edit file
c) reset perms & ownership back to their original values; don't forget the sticky bit!

Use Midnight Commander if its easier (type mc at the prompt).

HTH
Title: edit web panel cgi
Post by: stephen noble on September 23, 2004, 06:12:10 PM
edit the file elsewhere, say your home directory

make it writable by yourself, chmod a+w file
edit with a friendly editor say ultraedit, unix mode
then cp the file on top of the original, as root.
the original permissions are preserved.