Procházet zdrojové kódy

Additional Fixes for FastDL and Other Perms Issues

own3mall před 6 měsíci
rodič
revize
5e6957fe54
1 změnil soubory, kde provedl 8 přidání a 2 odebrání
  1. 8 2
      OGP/ogp_agent.pl

+ 8 - 2
OGP/ogp_agent.pl

@@ -179,10 +179,14 @@ if (-e AGENT_LOG_FILE)
 }
 }
 
 
 # Fix permissions on OGP files
 # Fix permissions on OGP files
+my $screenDir = AGENT_RUN_DIR . "/../home/cyg_server/.screen";
+check_b4_chdir($screenDir);
+chmod 0700, AGENT_RUN_DIR . "/../home/cyg_server/.screen";
+chdir AGENT_RUN_DIR;
+
 my $ownerShipAgentResults = take_ownership(AGENT_RUN_DIR);
 my $ownerShipAgentResults = take_ownership(AGENT_RUN_DIR);
 my $ownerShipAgentResults2 = take_ownership(AGENT_RUN_DIR . "/ogp_agent.pl");
 my $ownerShipAgentResults2 = take_ownership(AGENT_RUN_DIR . "/ogp_agent.pl");
-my $ogpFilesEntirePath = AGENT_RUN_DIR . "/../bin/ogp_agent";
-my $ownerShipAgentResultsFixesAgain = take_ownership($ogpFilesEntirePath);
+my $ownerShipAgentResults3 = take_ownership(AGENT_RUN_DIR . "/../bin/ogp_agent");	
 
 
 logger "User running agent script is: " . USER_RUNNING_SCRIPT;
 logger "User running agent script is: " . USER_RUNNING_SCRIPT;
 
 
@@ -278,6 +282,8 @@ elsif ($no_startups != 1)
 	closedir(STARTUPDIR);
 	closedir(STARTUPDIR);
 }
 }
 
 
+chdir AGENT_RUN_DIR;
+
 # Create the pid file
 # Create the pid file
 open(PID, '>', AGENT_PID_FILE)
 open(PID, '>', AGENT_PID_FILE)
   or die("Can't write to pid file - " . AGENT_PID_FILE . "\n");
   or die("Can't write to pid file - " . AGENT_PID_FILE . "\n");