Windows File Permission Errors?

Moderator: crythias

Post Reply
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Windows File Permission Errors?

Post by MichaelR »

Hey,

I am getting these weird errors when I have moved by storage for articles etc out of the database and onto the file system. I have also run the 'Move Article Storage' script, which didn't throw any errors.
It is a Windows 7 x64 VM, The 'C:\PROGRAM FILES (x86)\OTRS' folder has 'Everyone' permissions....

Is there a way to run the SetPermissions script in windows? I've had a look and it seems to just be working in Linux.

OTRS Logs:
[Wed Mar 30 09:10:52 2011][Notice][Kernel::System::Ticket::ArticleStorageFS::ArticleStorageInit] Can't create C:/PROGRA~2/OTRS/OTRS/var/article/check_permissions_1592: File exists, Try: $OTRS_HOME/bin/otrs.SetPermissions.pl !
[Wed Mar 30 09:44:21 2011][Notice][Kernel::System::Ticket::ArticleStorageFS::ArticleStorageInit] Can't create C:/PROGRA~2/OTRS/OTRS/var/article/check_permissions_1592: File exists, Try: $OTRS_HOME/bin/otrs.SetPermissions.pl !

APACHE Logs:
[Wed Mar 30 09:10:52 2011] [error] [Wed Mar 30 09:10:52 2011] -e: Error: Can't create C:/PROGRA~2/OTRS/OTRS/var/article/check_permissions_1592: File exists \n[Wed Mar 30 09:10:52 2011] -e: \n[Wed Mar 30 09:10:52 2011] -e: Try: $OTRS_HOME/bin/otrs.SetPermissions.pl !!!\n
[Wed Mar 30 09:10:52 2011] [error] [Wed Mar 30 09:10:52 2011] -e: Error: Can't create C:/PROGRA~2/OTRS/OTRS/var/article/check_permissions_1592: File exists \n[Wed Mar 30 09:10:52 2011] -e: \n[Wed Mar 30 09:10:52 2011] -e: Try: $OTRS_HOME/bin/otrs.SetPermissions.pl !!!\n

Also (might not be related), the Apache logs are showing *alot* of 'Scalars Leaked' errors?

Cheers,
Michael
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Windows File Permission Errors?

Post by MichaelR »

Adding some more info:

I have had a look in ArticleStorageFS.pm
Specifically this section seems to be failing, could this be a specific windows error?

It happens intermittently, where if I simply refresh the page it goes away. I can't see why this is happening?

if ( mkdir( "$Self->{ArticleDataDir}/check_permissions_$$", 022 ) ) {
rmdir("$Self->{ArticleDataDir}/check_permissions_$$");
if ( File::Path::mkpath( [$Path], 0, 0775 ) ) {
File::Path::rmtree( [$Path] );
}
}

Edit: Spelling
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Windows File Permission Errors?

Post by MichaelR »

Hmm... I decided that I would just comment out the lines I posted above, as considering the OTRS folder has 'Everyone' permissions there shouldn't be any permission problems.

So far the errors I have been getting are not appearing, but that doesn't mean it is fixed, I will continue to monitor.
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
Kreuzi2000
Znuny newbie
Posts: 14
Joined: 04 Aug 2010, 09:13
Znuny Version: 3.0.9

Re: Windows File Permission Errors?

Post by Kreuzi2000 »

Hello,
i have the same problem. Is there a solution maybe?
If i comment out these lines i get an "Software Error" when i create a new ticket.
Best Regards
OTRS 2.4.8, Windows Server 2008R2, MS SQL 2008
OTRS 3.0.11 (Testserver), Windows Server 2008R2, MS SQL 2008
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Windows File Permission Errors?

Post by MichaelR »

If you get a Software Error then you have commented the lines out incorrectly.

I have commented out lines 41 <-> 59

Code: Select all

    #if ( -d $Path ) {
    #    File::Path::rmtree( [$Path] );
    #}
    #if ( mkdir( "$Self->{ArticleDataDir}/check_permissions_$$", 022 ) ) {
    #    rmdir("$Self->{ArticleDataDir}/check_permissions_$$");
    #    if ( File::Path::mkpath( [$Path], 0, 0775 ) ) {
    #        File::Path::rmtree( [$Path] );
    #    }
    #}
    #else {
    #    my $Error = $!;
    #    $Self->{LogObject}->Log(
    #        Priority => 'notice',
    #        Message  => "Can't create $Self->{ArticleDataDir}/check_permissions_$$: $Error, "
    #            . "Try: \$OTRS_HOME/bin/otrs.SetPermissions.pl !",
    #    );
    #    die "Error: Can't create $Self->{ArticleDataDir}/check_permissions_$$: $Error \n\n "
    #        . "Try: \$OTRS_HOME/bin/otrs.SetPermissions.pl !!!\n";
    #}
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
Kreuzi2000
Znuny newbie
Posts: 14
Joined: 04 Aug 2010, 09:13
Znuny Version: 3.0.9

Re: Windows File Permission Errors?

Post by Kreuzi2000 »

Hello MichaelR, i am really sorry for my late answer!
It works great now with your instructions, i am really happy that this error is gone. THANK YOU VERY MUCH!!!!
Regards
OTRS 2.4.8, Windows Server 2008R2, MS SQL 2008
OTRS 3.0.11 (Testserver), Windows Server 2008R2, MS SQL 2008
jfreeman2nc
Znuny advanced
Posts: 136
Joined: 04 Oct 2010, 14:14
Znuny Version: 3.0.10; 3.1.4
Location: US, SC
Contact:

Re: Windows File Permission Errors?

Post by jfreeman2nc »

I am getting the same error in 3.0.10 running on Server 2008 R2, along with the error in the log the attachment is also not sent to the recipient. What makes this error so odd is that is only happens randomly, most times the attachment goes through but randomly the error appears and no attachment is sent. However, this has occurred to each of the 8 users in the who work in OTRS.

Were you also seeing that attachments were not being sent? If so, did commenting out those lines resolve the error as well as the issue with the attachment not being sent?
OTRS 3.1.4
Windows Server 2008 R2
MySQL

OTRS 3.0.10 - soon to be 3.0.12 or 3.1.4
Windows Server 2008 R2
MySQL DB
Post Reply