in reply to Re^3: Perl Permissions
in thread Perl Permissions

#!/usr/bin/perl use Win32::Process::Info; #Requests to use the +Win32 Mod use Date::EzDate; #Requests to use the +date mod use File::Copy; my $printinfo = Win32::Process::Info->new(); #Gets the system proc +ess info my @info = $printinfo->GetProcInfo(); #Stored to an array my $currentdate = Date::EzDate->new(); #Loads the current Da +te an Time # #Manageing Log Files Chronologically # $hour = 2; until ($hour > 26) #Loop to r +ead all log files { opendir(LOGS, "/perl/ass/")|| die "dir not found"; #Opens the + folder containing the days log files @logfiles = readdir(LOGS); #Puts the +name of all files into an array closedir(LOGS); $currentlog = "/perl/ass/@logfiles[$hour]"; chmod (0777, $currentlog) or die "Can't change permissions: $!"; + #Gives everyone all permissions on all fi +les in the folder open(CURRENTLOG, $currentlog)|| die "file not found: $!"; $firstline = <CURRENTLOG>; $date = substr($firstline,0 ,2); $hour++; }
I can't give you a list of owner's and permissions as i'm working in windows and do not know the commands sorry.
http://img.photobucket.com/albums/v230/blundell/errorperl.jpg

Replies are listed 'Best First'.
Re^5: Perl Permissions
by Joost (Canon) on Dec 03, 2006 at 14:43 UTC
Re^5: Perl Permissions
by SheridanCat (Pilgrim) on Dec 03, 2006 at 19:46 UTC
    To determine what process is holding a lock on the files you are trying to access, you might look at Process Explorer.

    Your problem is really more a system/file problem than a Perl issue.

Re^5: Perl Permissions ($^E)
by tye (Sage) on Dec 04, 2006 at 16:24 UTC

    Since this is Win32, you might want to report $^E (in addition to $!), as it can have a more specific or more detailed explanation than what $! provides in some situations (and this sounds like one of those).

    - tye