ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilUseRootConfirmed Class Reference

The user seems to use root or we cannot determine which user he uses. More...

+ Inheritance diagram for ilUseRootConfirmed:
+ Collaboration diagram for ilUseRootConfirmed:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 

Detailed Description

The user seems to use root or we cannot determine which user he uses.

We should ask...

Definition at line 27 of file class.ilUseRootConfirmed.php.

Member Function Documentation

◆ achieve()

ilUseRootConfirmed::achieve ( Setup\Environment  $environment)

Definition at line 67 of file class.ilUseRootConfirmed.php.

67 : Setup\Environment
68 {
69 $admin_interaction = $environment->getResource(Setup\Environment::RESOURCE_ADMIN_INTERACTION);
70
71 $message =
72 "You seem to be using root or your user just can't be determined. You should\n" .
73 "be running this setup with the same user the webserver uses. If this is not\n" .
74 "the case there might be problems accessing files via the web later...\n" .
75 "If you still proceed, carefully check file access rights in the data-directories\n" .
76 "after finishing the setup.\n";
77
78 if (!$admin_interaction->confirmOrDeny($message)) {
79 throw new Setup\NoConfirmationException($message);
80 }
81
82 return $environment;
83 }
$message
Definition: xapiexit.php:31

References $message, and ILIAS\Setup\Environment\getResource().

+ Here is the call graph for this function:

◆ getHash()

ilUseRootConfirmed::getHash ( )

Definition at line 32 of file class.ilUseRootConfirmed.php.

32 : string
33 {
34 return hash(
35 "sha256",
36 get_class($this)
37 );
38 }

◆ getLabel()

ilUseRootConfirmed::getLabel ( )

Definition at line 43 of file class.ilUseRootConfirmed.php.

43 : string
44 {
45 return "Confirm that root should be used to run the setup.";
46 }

◆ getPreconditions()

ilUseRootConfirmed::getPreconditions ( Setup\Environment  $environment)

Definition at line 59 of file class.ilUseRootConfirmed.php.

59 : array
60 {
61 return [];
62 }

◆ isApplicable()

ilUseRootConfirmed::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 88 of file class.ilUseRootConfirmed.php.

88 : bool
89 {
90 if (function_exists("posix_geteuid") && posix_geteuid() != 0) {
91 return false;
92 }
93
94 return true;
95 }

◆ isNotable()

ilUseRootConfirmed::isNotable ( )

Definition at line 51 of file class.ilUseRootConfirmed.php.

51 : bool
52 {
53 return false;
54 }

The documentation for this class was generated from the following file: