Can't add new fields

Moderator: crythias

Locked
dusansusic
Znuny newbie
Posts: 11
Joined: 08 Dec 2013, 13:50
Znuny Version: 3.2.9

Can't add new fields

Post by dusansusic »

Hi to all...
I have problem when I tried to add new dynamic fields when creating new ticket. I defined new dynamic field in Admin -> Dynamic Field... Then I enter in sysconfig menu, and select Ticket from dropdown menu and click on Frontend::Agent::Ticket::ViewPhoneNew... I scroll down to add Dynamic field which I defined before clicking on "plus" sign and I get error:

Code: Select all

Oops! An Error occurred.
Error Message: Can't write ConfigItem!
You can  Send a bugreport or go back to the previous page.

Code: Select all

Backend ERROR: OTRS-CGI-86 Perl: 5.12.3 OS: linux Time: Mon Dec 9 08:25:59 2013 Message: Can't write ConfigItem! RemoteAddress: 10.0.9.208 RequestURI: /index.pl Traceback (26894): Module: Kernel::Modules::AdminSysConfig::Run (OTRS 3.2.9) Line: 169 Module: Kernel::System::Web::InterfaceAgent::Run (OTRS 3.2.9) Line: 863 Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 41 Module: (eval) (v1.99) Line: 204 Module: ModPerl::RegistryCooker::run (v1.99) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31

What causing this problem? Thanks...
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't add new fields

Post by jojo »

check your file permissions and run the otrs.SetPermission.pl script
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
dusansusic
Znuny newbie
Posts: 11
Joined: 08 Dec 2013, 13:50
Znuny Version: 3.2.9

Re: Can't add new fields

Post by dusansusic »

Which file permissions?

Code: Select all

otrs:/opt/otrs/bin # ls -la /opt/otrs
total 24104
drwxrwxr-x  8 otrs www      4096 Aug 14 22:46 .
drwxr-xr-x  3 root root     4096 Jun  5  2012 ..
-rw-r--r--  1 root root     1170 Jul  4 11:19 .fetchmailrc
-rw-rw-r--  1 otrs www      1170 Jul  4 11:19 .fetchmailrc.dist
-rw-rw-r--  1 otrs www      1638 Jul  4 11:19 .mailfilter
-rw-rw-r--  1 otrs www      1638 Jul  4 11:19 .mailfilter.dist
-rw-r--r--  1 root root     1873 Jul  4 11:19 .procmailrc
-rw-rw-r--  1 otrs www      1873 Jul  4 11:19 .procmailrc.dist
-rw-rw-r--  1 otrs www    208470 Jul  4 11:19 ARCHIVE
-rw-rw-r--  1 otrs www    510283 Jul  4 11:19 CHANGES.md
-rw-rw-r--  1 otrs www     34520 Jul  4 11:19 COPYING
-rw-rw-r--  1 otrs www      8533 Jul  4 11:19 COPYING-Third-Party
drwxrwxr-x  2 otrs www      4096 Aug 14 22:46 Custom
-rw-rw-r--  1 otrs www      7887 Jul  4 11:19 INSTALL.md
drwxrwxr-x 12 otrs www      4096 Dec  4 14:03 Kernel
-rw-rw-r--  1 otrs www      4622 Jul  4 11:19 README.database.md
-rw-rw-r--  1 otrs www      7850 Jul  4 11:19 README.md
-rw-rw-r--  1 otrs www      1704 Jul  4 11:19 README.webserver.md
-rw-rw-r--  1 otrs www       103 Jul  4 11:19 RELEASE
-rw-rw-r--  1 otrs www      9063 Jul  4 11:19 UPGRADING.md
drwxrwxr-x  4 otrs www      4096 Dec  4 14:03 bin
drwxrwxr-x  6 otrs www      4096 Dec  4 14:02 doc
-rw-r--r--  1 root root 23807746 Jun  5  2012 otrs-3.1.6-02.noarch.rpm
drwxrwxr-x  7 otrs www      4096 Aug 14 22:46 scripts
drwxrwxr-x 14 otrs www      4096 Aug 14 22:46 var
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't add new fields

Post by jojo »

Kernel/Config/Files/ZZZAuto.pm and Kernel/Config/Files/ZZZAAuto.pm
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
dusansusic
Znuny newbie
Posts: 11
Joined: 08 Dec 2013, 13:50
Znuny Version: 3.2.9

Re: Can't add new fields

Post by dusansusic »

jojo wrote:Kernel/Config/Files/ZZZAuto.pm and Kernel/Config/Files/ZZZAAuto.pm

Code: Select all

otrs:/opt/otrs/Kernel/Config/Files # ls -la ZZZ*.pm
-rw-rw-r-- 1 wwwrun www  300573 Dec  9 08:26 ZZZAAuto.pm
-rw-rw-r-- 1 root   root   9046 Aug 14 21:55 ZZZAuto.pm
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't add new fields

Post by jojo »

how should the webserver change a file owned by root without the correct permissions?

Please run the otrs.SetPermission.pl script
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
dusansusic
Znuny newbie
Posts: 11
Joined: 08 Dec 2013, 13:50
Znuny Version: 3.2.9

Re: Can't add new fields

Post by dusansusic »

jojo wrote:how should the webserver change a file owned by root without the correct permissions?

Please run the otrs.SetPermission.pl script

OK, I tried but I got error...

Code: Select all

otrs:/opt/otrs/bin # ./otrs.SetPermissions.pl --admin-user=dusan.susic /opt/otrs/Kernel/Config/Files/ZZZAuto.pm
bin/otrs.SetPermissions.pl - set OTRS file permissions
Copyright (C) 2001-2013 xxx, http://otrs.com/
ERROR: --otrs-user=<OTRS_USER>
Also, I tried --web-user=dusan.susic but I did not succed...


I dont know do I need to set permissions for ZZZAAuto.pm and ZZZAuto.pm files or for whole /opt/otrs folder?

Anyway, I tried to set permissions for files and I got error showed above...
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't add new fields

Post by jojo »

I doubt that the Apache is running with a user named like you.

Please ask your Linux Admin for help and have a look at the manual: http://doc.otrs.org/3.3/en/html/manual- ... -otrs.html
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
dusansusic
Znuny newbie
Posts: 11
Joined: 08 Dec 2013, 13:50
Znuny Version: 3.2.9

Re: Can't add new fields

Post by dusansusic »

jojo wrote:I doubt that the Apache is running with a user named like you.

Please ask your Linux Admin for help and have a look at the manual: http://doc.otrs.org/3.3/en/html/manual- ... -otrs.html

@jojo Thanks man, I added dynamic fields after I changed permissions...
Locked