Koozali.org: home of the SME Server

edit web panel cgi

Offline kadybee

  • **
  • 40
  • +0/-0
edit web panel cgi
« 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
......

Offline smeghead

  • *
  • 563
  • +0/-0
edit web panel cgi
« Reply #1 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
..................

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
edit web panel cgi
« Reply #2 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.