IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19036


Ignore:
Timestamp:
Aug 12, 2008, 1:53:40 PM (18 years ago)
Author:
jhoblitt
Message:

add sanity checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r18457 r19036  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.81 2008-07-10 02:40:33 jhoblitt Exp $
     3# $Id: Server.pm,v 1.82 2008-08-12 23:53:40 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    13421342                or die "can't create storage path: $storage_path";
    13431343        }
     1344        # check to make sure at least the parent directory has the proper
     1345        # permissions
     1346        my $mode = (stat($storage_path))[2] & 07777;
     1347        unless ($mode == 0775) {
     1348            $log->error("$storage_path has the wrong permissions of: %04o", $mode);
     1349            chmod(0775, $storage_path) or die "can't chmod $storage_path: $!";
     1350        }
     1351
    13441352        my $fqpn = File::Spec->catfile($storage_path, $storage_filename);
    13451353        $uri = URI::file->new($fqpn);
Note: See TracChangeset for help on using the changeset viewer.