You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2013/08/29 21:54:54 UTC

svn commit: r1518787 - /vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Author: fapeeler
Date: Thu Aug 29 19:54:54 2013
New Revision: 1518787

URL: http://svn.apache.org/r1518787
Log:
VCL-698

moved routine call related to recursively changing permissions. Now it only modifies if it is a local disk. If nfs shares or someother network file system has blocks in to prevent file ownership changes, it will cause reservation to fail


Modified:
    vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1518787&r1=1518786&r2=1518787&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Thu Aug 29 19:54:54 2013
@@ -2434,16 +2434,17 @@ sub create_user {
 			else {
 				notify($ERRORS{'WARNING'}, 0, "failed to add user's public keys to $authorized_keys_file_path");
 			}
+			
+			if (!$self->set_file_owner($home_directory_path, $user_login_id, 'vcl', 1)) {
+				notify($ERRORS{'WARNING'}, 0, "failed to set owner of user's home directory: $home_directory_path");
+				return;
+			}
 		}
 		else {
 			notify($ERRORS{'DEBUG'}, 0, "skipping adding user's public keys to $authorized_keys_file_path, home directory is on a network share");
 		}
 	}
 	
-	if (!$self->set_file_owner($home_directory_path, $user_login_id, 'vcl', 1)) {
-		notify($ERRORS{'WARNING'}, 0, "failed to set owner of user's home directory: $home_directory_path");
-		return;
-	}
 
 	return 1;
 } ## end sub create_user