ILIAS  release_7 Revision v7.30-3-g800a261c036
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 11 of file class.ilUseRootConfirmed.php.

Member Function Documentation

◆ achieve()

ilUseRootConfirmed::achieve ( Setup\Environment  $environment)

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

51 : Setup\Environment
52 {
53 $admin_interaction = $environment->getResource(Setup\Environment::RESOURCE_ADMIN_INTERACTION);
54
55 $message =
56 "You seem to be using root or your user just can't be determined. You should\n" .
57 "be running this setup with the same user the webserver uses. If this is not\n" .
58 "the case there might be problems accessing files via the web later...\n".
59 "If you still proceed, carefully check file access rights in the data-directories\n".
60 "after finishing the setup.\n";
61
62 if (!$admin_interaction->confirmOrDeny($message)) {
63 throw new Setup\NoConfirmationException($message);
64 }
65
66 return $environment;
67 }
$message
Definition: xapiexit.php:14

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

+ Here is the call graph for this function:

◆ getHash()

ilUseRootConfirmed::getHash ( )

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

16 : string
17 {
18 return hash(
19 "sha256",
20 get_class($this)
21 );
22 }

◆ getLabel()

ilUseRootConfirmed::getLabel ( )

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

27 : string
28 {
29 return "Confirm that root should be used to run the setup.";
30 }

◆ getPreconditions()

ilUseRootConfirmed::getPreconditions ( Setup\Environment  $environment)

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

43 : array
44 {
45 return [];
46 }

◆ isApplicable()

ilUseRootConfirmed::isApplicable ( Setup\Environment  $environment)

@inheritDoc

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

72 : bool
73 {
74 if (function_exists("posix_geteuid") && posix_geteuid() != 0) {
75 return false;
76 }
77
78 return true;
79 }

◆ isNotable()

ilUseRootConfirmed::isNotable ( )

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

35 : bool
36 {
37 return false;
38 }

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