OTRS 3.3.4 change of file permissions after update

Moderator: crythias

Locked
ZimboKraut
Znuny newbie
Posts: 9
Joined: 25 Nov 2013, 15:58
Znuny Version: 3.3.1
Real Name: Marc-O. Kalis
Company: Kalis Communications Consulting

OTRS 3.3.4 change of file permissions after update

Post by ZimboKraut »

Hi there
I have comacross something rather strange...
either otrs or httpd are changeing file-permissions without reassonable cause.

[root@n33lnp62 CacheFileStorable]# ls -l
total 136
drwxrws---. 16 otrs apache 4096 Feb 25 07:40 CacheInternalGroup
drwxrws---. 6 otrs apache 4096 Feb 7 11:19 CacheInternalLinkObject
drwxrws---. 18 apache apache 4096 Feb 25 07:36 CacheInternalLoader
drwxrws---. 5 otrs apache 4096 Jan 31 10:35 CacheInternalLock
drwxrws---. 4 otrs apache 4096 Feb 4 09:56 CacheInternalPriority
drwxrws---. 12 otrs apache 4096 Feb 20 07:33 CacheInternalQueue
drwxrws---. 3 otrs apache 4096 Feb 4 09:35 CacheInternalSalutation
drwxrws---. 3 otrs apache 4096 Feb 23 00:20 CacheInternalSearchProfile
drwxrws---. 5 otrs apache 4096 Feb 11 09:55 CacheInternalService
drwxrws---. 12 otrs apache 4096 Feb 23 00:20 CacheInternalState
drwxrws---. 5 otrs apache 4096 Feb 7 11:32 CacheInternalStdAttachment
drwxrws---. 17 otrs apache 4096 Feb 18 10:40 CacheInternalSystemAddress
drwxrws---. 18 otrs apache 4096 Feb 3 13:40 CacheInternalTicket
drwxrws---. 5 otrs apache 4096 Feb 4 09:56 CacheInternalType
drwxrws---. 17 apache apache 4096 Feb 25 07:36 CacheInternalUser
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 CacheInternalValid
drwxrws---. 7 otrs apache 4096 Feb 25 07:40 CustomerUser
drwxrws---. 4 otrs apache 4096 Feb 24 17:00 CustomerUser_CustomerSearch
drwxrws---. 10 apache apache 4096 Feb 25 07:36 Dashboard
drwxrws---. 3 otrs apache 4096 Feb 23 00:20 DashboardProductNotify
drwxrws---. 3 apache apache 4096 Feb 25 07:36 DashboardQueueOverview
drwxrws---. 8 otrs apache 4096 Feb 25 07:36 DynamicField
drwxrws---. 6 otrs apache 4096 Feb 25 07:39 DynamicFieldValue
drwxrws---. 9 apache apache 4096 Feb 25 07:39 GenericAgent
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 PackageParse
drwxrws---. 3 apache apache 4096 Feb 25 07:36 ProcessManagement_Process
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 RepositoryGet
drwxrws---. 4 otrs apache 4096 Jan 31 10:31 RepositoryList
drwxrws---. 9 otrs apache 4096 Feb 25 07:36 Stats
drwxrws---. 11 otrs apache 4096 Feb 4 08:06 SysConfig
drwxrws---. 12 apache apache 4096 Feb 25 07:36 TicketSearch
drwxrws---. 3 otrs apache 4096 Feb 24 13:40 Webservice
drwxrws---. 11 otrs apache 4096 Feb 16 01:05 XML
drwxrws---. 10 otrs apache 4096 Jan 31 10:33 XMLParse

(note the apache user ownership)

the installation is very basic as we only want to use it for task "collection" in other words, the team members are just sending emails to the otrs mailbox and it takes it to place the emails in their queues.
all we are doing collectong numbers for the management for the little tasks that come in via phone, email or satr (shout across the room).
The odd thing is, that I have run otrs.Setpermissions.pl numerous times and it runs successfully:

[root@XXXXX] # /opt/otrs/bin/otrs.SetPermissions.pl /opt/otrs --otrs-user=otrs --otrs-group=apache --web-group=apache --web-user=apache

bin/otrs.SetPermissions.pl - set OTRS file permissions
Copyright (C) 2001-2014 xxx, http://otrs.com/
Setting permissions on /opt/otrs
Setting permissions on /opt/otrs/var
Setting permissions on /opt/otrs/bin/*
Setting permissions on /opt/otrs/scripts/
Setting permissions on /opt/otrs/Kernel/Config.pm
Setting owner rw and group ro permissions on /opt/otrs/.procmailrc
Setting owner rw and group ro permissions on /opt/otrs/.fetchmailrc

and the result is:

[root@n33lnp62 CacheFileStorable]# ll
total 144
drwxrws---. 18 otrs apache 4096 Feb 25 07:52 CacheInternalGroup
drwxrws---. 6 otrs apache 4096 Feb 7 11:19 CacheInternalLinkObject
drwxrws---. 18 otrs apache 4096 Feb 25 07:36 CacheInternalLoader
drwxrws---. 5 otrs apache 4096 Jan 31 10:35 CacheInternalLock
drwxrws---. 4 otrs apache 4096 Feb 4 09:56 CacheInternalPriority
drwxrws---. 15 otrs apache 4096 Feb 25 11:43 CacheInternalQueue
drwxrws---. 3 otrs apache 4096 Feb 4 09:35 CacheInternalSalutation
drwxrws---. 3 otrs apache 4096 Feb 23 00:20 CacheInternalSearchProfile
drwxrws---. 5 otrs apache 4096 Feb 11 09:55 CacheInternalService
drwxrws---. 14 otrs apache 4096 Feb 25 07:52 CacheInternalState
drwxrws---. 5 otrs apache 4096 Feb 7 11:32 CacheInternalStdAttachment
drwxrws---. 17 otrs apache 4096 Feb 18 10:40 CacheInternalSystemAddress
drwxrws---. 3 otrs apache 4096 Feb 25 11:36 CacheInternalSystemData
drwxrws---. 18 otrs apache 4096 Feb 3 13:40 CacheInternalTicket
drwxrws---. 5 otrs apache 4096 Feb 4 09:56 CacheInternalType
drwxrws---. 7 otrs apache 4096 Feb 25 12:03 CacheInternalUser
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 CacheInternalValid
drwxrws---. 11 otrs apache 4096 Feb 25 11:35 CustomerUser
drwxrws---. 7 otrs apache 4096 Feb 25 11:10 CustomerUser_CustomerSearch
drwxrws---. 15 otrs apache 4096 Feb 25 11:43 Dashboard
drwxrws---. 3 otrs apache 4096 Feb 23 00:20 DashboardProductNotify
drwxrws---. 4 otrs apache 4096 Feb 25 11:43 DashboardQueueOverview
drwxrws---. 8 otrs apache 4096 Feb 25 07:36 DynamicField
drwxrws---. 13 otrs apache 4096 Feb 25 12:20 DynamicFieldValue
drwxrws---. 9 otrs apache 4096 Feb 25 07:39 GenericAgent
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 PackageParse
drwxrws---. 4 otrs apache 4096 Feb 25 11:43 ProcessManagement_Process
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 RepositoryGet
drwxrws---. 4 otrs apache 4096 Jan 31 10:31 RepositoryList
drwxrws---. 10 otrs apache 4096 Feb 25 07:49 Stats
drwxrws---. 3 otrs apache 4096 Feb 25 07:49 StatsRun
drwxrws---. 13 otrs apache 4096 Feb 25 11:35 SysConfig
drwxrws---. 12 otrs apache 4096 Feb 25 07:36 TicketSearch
drwxrws---. 4 otrs apache 4096 Feb 25 11:35 Webservice
drwxrws---. 11 otrs apache 4096 Feb 16 01:05 XML
drwxrws---. 13 otrs apache 4096 Feb 25 11:35 XMLParse

so all in the clear.

but after a sometime (anything between 15 and 30 min) I get email from cron like this:

ERROR: OTRS-otrs.PostMasterMailbox.pl-63 Perl: 5.10.1 OS: linux Time: Tue Feb 25 12:00:02 2014

Message: Can't write '/opt/otrs/var/tmp/CacheFileStorable/CacheInternalSystemAddress/a/1/a1d9bbc86cf68313acc9d8dc0fdefd70': Permission denied

Traceback (8382):
Module: Kernel::System::Main::FileWrite (OTRS 3.3.4) Line: 485
Module: Kernel::System::Cache::FileStorable::Set (OTRS 3.3.4) Line: 89
Module: Kernel::System::Cache::Set (OTRS 3.3.4) Line: 130
Module: Kernel::System::CacheInternal::Set (OTRS 3.3.4) Line: 129
Module: Kernel::System::SystemAddress::SystemAddressQueueID (OTRS 3.3.4) Line: 416
Module: Kernel::System::PostMaster::DestQueue::GetQueueID (OTRS 3.3.4) Line: 64
Module: Kernel::System::PostMaster::Run (OTRS 3.3.4) Line: 379
Module: Kernel::System::MailAccount::IMAP::_Fetch (OTRS 3.3.4) Line: 203
Module: Kernel::System::MailAccount::IMAP::Fetch (OTRS 3.3.4) Line: 77
Module: Kernel::System::MailAccount::MailAccountFetch (OTRS 3.3.4) Line: 427
Module: main::Fetch (unknown version) Line: 177
Module: /opt/otrs/bin/otrs.PostMasterMailbox.pl (unknown version) Line: 90

ERROR: OTRS-otrs.PostMasterMailbox.pl-63 Perl: 5.10.1 OS: linux Time: Tue Feb 25 12:00:02 2014

Message: Need UserLogin or UserID!

Traceback (8382):
Module: Kernel::System::User::UserLookup (OTRS 3.3.4) Line: 806
Module: Kernel::System::Ticket::TicketGet (OTRS 3.3.4) Line: 1201
Module: Kernel::System::Ticket::HistoryAdd (OTRS 3.3.4) Line: 5080
Module: Kernel::System::Ticket::TicketCreate (OTRS 3.3.4) Line: 525
Module: Kernel::System::PostMaster::NewTicket::Run (OTRS 3.3.4) Line: 189
Module: Kernel::System::PostMaster::Run (OTRS 3.3.4) Line: 388
Module: Kernel::System::MailAccount::IMAP::_Fetch (OTRS 3.3.4) Line: 203
Module: Kernel::System::MailAccount::IMAP::Fetch (OTRS 3.3.4) Line: 77
Module: Kernel::System::MailAccount::MailAccountFetch (OTRS 3.3.4) Line: 427
Module: main::Fetch (unknown version) Line: 177
Module: /opt/otrs/bin/otrs.PostMasterMailbox.pl (unknown version) Line: 90

mkdir /opt/otrs/var/tmp/CacheFileStorable/CacheInternalUser/7: Permission denied at /opt/otrs/Kernel/System/Cache/FileStorable.pm line 79

and then the file-permission get "progressively worse" from this:

[root@n33lnp62 CacheFileStorable]# ls -l
total 144
drwxrws---. 18 otrs apache 4096 Feb 25 07:52 CacheInternalGroup
drwxrws---. 6 otrs apache 4096 Feb 7 11:19 CacheInternalLinkObject
drwxrws---. 18 otrs apache 4096 Feb 25 07:36 CacheInternalLoader
drwxrws---. 5 otrs apache 4096 Jan 31 10:35 CacheInternalLock
drwxrws---. 4 otrs apache 4096 Feb 4 09:56 CacheInternalPriority
drwxrws---. 15 otrs apache 4096 Feb 25 11:43 CacheInternalQueue
drwxrws---. 3 otrs apache 4096 Feb 4 09:35 CacheInternalSalutation
drwxrws---. 3 otrs apache 4096 Feb 23 00:20 CacheInternalSearchProfile
drwxrws---. 5 otrs apache 4096 Feb 11 09:55 CacheInternalService
drwxrws---. 14 otrs apache 4096 Feb 25 07:52 CacheInternalState
drwxrws---. 5 otrs apache 4096 Feb 7 11:32 CacheInternalStdAttachment
drwxrws---. 17 otrs apache 4096 Feb 18 10:40 CacheInternalSystemAddress
drwxrws---. 3 otrs apache 4096 Feb 25 11:36 CacheInternalSystemData
drwxrws---. 18 otrs apache 4096 Feb 3 13:40 CacheInternalTicket
drwxrws---. 5 otrs apache 4096 Feb 4 09:56 CacheInternalType
drwxrws---. 7 apache apache 4096 Feb 25 12:03 CacheInternalUser
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 CacheInternalValid
drwxrws---. 11 otrs apache 4096 Feb 25 11:35 CustomerUser
drwxrws---. 7 otrs apache 4096 Feb 25 11:10 CustomerUser_CustomerSearch
drwxrws---. 15 otrs apache 4096 Feb 25 11:43 Dashboard
drwxrws---. 3 otrs apache 4096 Feb 23 00:20 DashboardProductNotify
drwxrws---. 4 otrs apache 4096 Feb 25 11:43 DashboardQueueOverview
drwxrws---. 8 otrs apache 4096 Feb 25 07:36 DynamicField
drwxrws---. 12 otrs apache 4096 Feb 25 11:10 DynamicFieldValue
drwxrws---. 9 otrs apache 4096 Feb 25 07:39 GenericAgent
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 PackageParse
drwxrws---. 4 otrs apache 4096 Feb 25 11:43 ProcessManagement_Process
drwxrws---. 3 otrs apache 4096 Jan 31 10:31 RepositoryGet
drwxrws---. 4 otrs apache 4096 Jan 31 10:31 RepositoryList
drwxrws---. 10 otrs apache 4096 Feb 25 07:49 Stats
drwxrws---. 3 otrs apache 4096 Feb 25 07:49 StatsRun
drwxrws---. 13 otrs apache 4096 Feb 25 11:35 SysConfig
drwxrws---. 12 otrs apache 4096 Feb 25 07:36 TicketSearch
drwxrws---. 4 otrs apache 4096 Feb 25 11:35 Webservice
drwxrws---. 11 otrs apache 4096 Feb 16 01:05 XML
drwxrws---. 13 otrs apache 4096 Feb 25 11:35 XMLParse

to what you can see in the beginning.

while it points to an issue with httpd (apache)
it only started when I updated from 3.3.1 via rpm to 3.3.4 which is, as far as I am aware, "permissible".

Anyone have an idea or need more infos to assist, as I have to admit, I am stumped, since there doesn't seem to be a pattern in timings or what actions to permorm in order for the system to do this.

Any help is greatly appreciated.

Regards from London
OTRS 3.3.4 on RedHat Enterprise Linux (RHEL) 6.3 kernel 2.6.32 x86_64 using MysqlD Ver 5.1.61
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS 3.3.4 change of file permissions after update

Post by crythias »

it shouldn't be a big deal if otrs is a member of apache group.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
ZimboKraut
Znuny newbie
Posts: 9
Joined: 25 Nov 2013, 15:58
Znuny Version: 3.3.1
Real Name: Marc-O. Kalis
Company: Kalis Communications Consulting

Re: OTRS 3.3.4 change of file permissions after update

Post by ZimboKraut »

Dooh...
Why didn't I think of that?.....
Will test right away and report back on the results.

thnx for that
OTRS 3.3.4 on RedHat Enterprise Linux (RHEL) 6.3 kernel 2.6.32 x86_64 using MysqlD Ver 5.1.61
ZimboKraut
Znuny newbie
Posts: 9
Joined: 25 Nov 2013, 15:58
Znuny Version: 3.3.1
Real Name: Marc-O. Kalis
Company: Kalis Communications Consulting

Re: OTRS 3.3.4 change of file permissions after update

Post by ZimboKraut »

Ok,

As promised, I have tested it and the solution of just adding otrs to the apache group works.

It doesn't quite explain why the ownership keeps on changing, but at least the system is running and does what is expected of it.
I do have another issue but I will start a new stread for this

thnx for your help crythias
OTRS 3.3.4 on RedHat Enterprise Linux (RHEL) 6.3 kernel 2.6.32 x86_64 using MysqlD Ver 5.1.61
Locked