After login i get this error message: Can't create director

Moderator: crythias

Post Reply
jresz
OTRS newbie
Posts: 7
Joined: 26 Sep 2012, 11:22
OTRS Version?: 3.1.10

After login i get this error message: Can't create director

Post by jresz »

When I try to login in my OTRS system first time I get this error message:
Can't create directory '/opt/otrs/var/tmp/CacheFileStorable': Permission denied
and the error details
Backend ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Wed Sep 26 05:19:06 2012 Message: Can't create directory '/opt/otrs/var/tmp/CacheFileStorable': Permission denied Traceback (6031): Module: Kernel::System::Cache::FileStorable::new (v1.9) Line: 40 Module: Kernel::System::Cache::new (v1.21) Line: 89 Module: Kernel::System::CacheInternal::new (v1.9) Line: 99 Module: Kernel::System::Loader::new (v1.18.2.1) Line: 85 Module: Kernel::Output::HTML::LayoutLoader::LoaderCreateAgentCSSCalls (v1.37) Line: 50 Module: Kernel::Output::HTML::Layout::Header (v1.381.2.13) Line: 1398 Module: Kernel::Output::HTML::Layout::ErrorScreen (v1.381.2.13) Line: 1183 Module: Kernel::Modules::AdminInit::Run (v1.17) Line: 50 Module: Kernel::System::Web::InterfaceAgent::Run (v1.64) Line: 868 Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46 Module: (eval) (v1.90) Line: 204 Module: ModPerl::RegistryCooker::run (v1.90) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.90) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31
Someby can help me how to resolve this problem?
Thanks

CSL
OTRS wizard
Posts: 159
Joined: 11 Nov 2011, 19:27
OTRS Version?: 3.0.11

Re: After login i get this error message: Can't create dire

Post by CSL »

You permissions are incorrect: run the /opt/otrs/bin/otrs.SetPermissions.pl script with appropriate arguments for your environment (can be found in the INSTALL file).
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL

jresz
OTRS newbie
Posts: 7
Joined: 26 Sep 2012, 11:22
OTRS Version?: 3.1.10

Re: After login i get this error message: Can't create dire

Post by jresz »

The script was run successful, with no error. This is why I don't understand it why I get this error.

crythias
Moderator
Posts: 10110
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: After login i get this error message: Can't create dire

Post by crythias »

jresz wrote:The script was run successful, with no error. This is why I don't understand it why I get this error.
You get this error because you provided/didn't provide the proper user and group names to the params.

From INSTALL:
Web server which runs as the OTRS user:

Code: Select all

bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=otrs /opt/otrs
Webserver with wwwrun user (e. g. SUSE):

Code: Select all

bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=wwwrun /opt/otrs
Webserver with apache user (e. g. Red Hat, CentOS):

Code: Select all

bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
Webserver with www-data user (e. g. Debian, Ubuntu):

Code: Select all

bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
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

jresz
OTRS newbie
Posts: 7
Joined: 26 Sep 2012, 11:22
OTRS Version?: 3.1.10

Re: After login i get this error message: Can't create dire

Post by jresz »

bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
bin/otrs.SetPermissions.pl <1.4> - set OTRS file permissions
Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
Setting permissions on /opt/otrs
Setting permissions on /opt/otrs/var
Setting permissions on /opt/otrs/bin/*
Setting permissions on /opt/otrs/scripts/*.pl
Setting permissions on /opt/otrs/scripts/tools/*.pl
Setting permissions on Kernel/Config.pm
Setting owner rw and group ro permissions on /opt/otrs/
And i get the same error at the login :(

crythias
Moderator
Posts: 10110
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: After login i get this error message: Can't create dire

Post by crythias »

what are the permissions on /opt/otrs/var/tmp ?
It may be possible that you are running apache as a user different than www-data.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
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

jresz
OTRS newbie
Posts: 7
Joined: 26 Sep 2012, 11:22
OTRS Version?: 3.1.10

Re: After login i get this error message: Can't create dire

Post by jresz »

I use Centos linux,
ls -l /opt/otrs/var/
total 64
drwxrwsr-x. 2 otrs apache 4096 Aug 28 03:48 article
drwxrwxr-x. 2 otrs apache 4096 Aug 28 03:48 cron
drwxrwxr-x. 2 otrs apache 4096 Aug 28 03:48 fonts
drwxrwxr-x. 3 otrs apache 4096 Aug 28 03:48 httpd
drwxrwsr-x. 2 otrs apache 4096 Sep 26 04:59 log
-rw-rw-r--. 1 otrs apache 23707 Oct 26 2010 logo-otrs.png
drwxrwxr-x. 2 otrs apache 4096 Aug 28 03:48 packages
drwxrwsr-x. 2 otrs apache 4096 Aug 28 03:48 sessions
drwxrwsr-x. 2 otrs apache 4096 Aug 28 03:48 spool
drwxrwsr-x. 2 otrs apache 4096 Aug 28 03:48 stats
drwxrwsr-x. 3 otrs apache 4096 Sep 26 08:14 tmp

crythias
Moderator
Posts: 10110
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: After login i get this error message: Can't create dire

Post by crythias »

ps -eo user,command | grep apache
and verify this (first column is the user running apache)
jresz wrote:drwxrwsr-x. 3 otrs apache 4096 Sep 26 08:14 tmp
I'm not entirely certain but I have a feeling it may be because of selinux enabled.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
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

jresz
OTRS newbie
Posts: 7
Joined: 26 Sep 2012, 11:22
OTRS Version?: 3.1.10

Re: After login i get this error message: Can't create dire

Post by jresz »

ps -eo user,command|grep apache
apache /usr/sbin/httpd
apache /usr/sbin/httpd
apache /usr/sbin/httpd
apache /usr/sbin/httpd
apache /usr/sbin/httpd
apache /usr/sbin/httpd
apache /usr/sbin/httpd
apache /usr/sbin/httpd
root grep apache

crythias
Moderator
Posts: 10110
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: After login i get this error message: Can't create dire

Post by crythias »

how about selinux?
sestatus
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
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

jresz
OTRS newbie
Posts: 7
Joined: 26 Sep 2012, 11:22
OTRS Version?: 3.1.10

Re: After login i get this error message: Can't create dire

Post by jresz »

Hi,
sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted

crythias
Moderator
Posts: 10110
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: After login i get this error message: Can't create dire

Post by crythias »

yep. as I've stated, and as well as the install docs, disable selinux.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
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

hemangc
OTRS newbie
Posts: 1
Joined: 06 Jun 2016, 08:29
OTRS Version?: 3.0.1
Real Name: Hemang Chhipani

Re: After login i get this error message: Can't create director

Post by hemangc »

Hi crythias,

Hope you are doing well.

I just read the thread and i am facing the same issue while updating OTRS from 2.4.15 to 3.0.1. in my environment we are using CentOS with SELinux Disabled mode. The otrs is successfully migrated with themes but when i access Web, i get below error message which i attached here as file name Browser.

Initially there was nogroup assign/define in /opt/otrs/var/tmp/CacheFileStorable/ but then i added apache group in it. but no success. i also run below command to set proper permissions in /opt/otrs directory with below command

/opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --webgroup=apache /opt/otrs

but that would not work.

Please help me to get this resolved as we are planning to update otrs to its latest version (otrs 5).


Thanks & Best Regards,
Hemang Chhipani
You do not have the required permissions to view the files attached to this post.

reneeb
OTRS guru
Posts: 4795
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: After login i get this error message: Can't create director

Post by reneeb »

Any messages in the log? What did the details show?
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

Post Reply