Browse Source

Added file permission modifiers

pull/24/head
Teknikode 8 years ago
parent
commit
e8303b18fd
  1. 6
      includes/update_profile.php

6
includes/update_profile.php

@ -149,6 +149,9 @@ if(isset($_POST)) @@ -149,6 +149,9 @@ if(isset($_POST))
else
{
mkdir($CONF['git_repo_path'][0].'gitolite-admin\\keydir\\u\\'.$user->username, 0777, true);
chown($CONF['git_repo_path'][0].'gitolite-admin\\keydir\\u\\'.$user->username, 'iusr');
chgrp($CONF['git_repo_path'][0].'gitolite-admin\\keydir\\u\\'.$user->username, 'Administrators');
chmod($CONF['git_repo_path'][0].'gitolite-admin\\keydir\\u\\'.$user->username, 0777);
}
$index = 0;
$keys = explode(",", $public_key);
@ -163,6 +166,9 @@ if(isset($_POST)) @@ -163,6 +166,9 @@ if(isset($_POST))
$fileHandle = fopen($keyFileName, 'w');
fwrite($fileHandle, $key);
fclose($fileHandle);
chown($keyFileName, 'iusr');
chgrp($keyFileName, 'Administrators');
chmod($keyFileName, 0777);
$index++;
}
}

Loading…
Cancel
Save