You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-20Lines changed: 14 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,11 +42,22 @@ In UNIX terms:
42
42
43
43
Clone or download the repository content to your server.
44
44
45
-
Link to `drupal_fix_permissions.sh` in the `/usr/local/bin` or another folder present in the user's PATH.
45
+
Two scripts are provided:
46
46
47
-
If you are using `autofix-drupal-perms.sh`, link it as well. Because it expects `drupal_fix_permissions.sh` to be at `/usr/local/bin` make sure that path exists or edit the autofix script.
47
+
*`drupal_fix_permissions.sh`: Main script that actually does the work
48
+
*`autofix-drupal-perms.sh`: Wrapper to invoke `drupal_fix_permissions.sh`
49
+
with predefined parameters. It is handy to configure in sudoers.
48
50
49
-
If required, edit your sudo configuration to allow users to run `drupal_fix_permissions.sh` as root.
51
+
If `autofix-drupal-perms.sh` fits your needs just symlink it into `/usr/local/bin`
52
+
or another location reachable from the user's PATH.
53
+
54
+
Otherwise, you can create your own wrapper or invoke `drupal_fix_permissions.sh` directly.
55
+
56
+
### Permissions
57
+
58
+
In order to manipulate files/folders ownership and permissions the script must be run as root.
59
+
You may need to configure your sudoers file to allow for that. An example is included in
60
+
`autofix-drupal-perms.sudoers.example` file.
50
61
51
62
52
63
## Usage
@@ -108,20 +119,3 @@ The script only changes the files and folders with the wrong permissions or
108
119
ownership, making it very fast when only a few files or folders need a fix. For
109
120
really large installations this is very important as other scripts update
110
121
permissions and ownership regardless of whether they are needed or not.
111
-
112
-
## Root permissions
113
-
114
-
Giving root permissions to regular users is dangerous. Luckily, there's a simple
115
-
script, `autofix-drupal-perms.sh`, to allow regular users to fix their sites
116
-
without risking the security.
117
-
118
-
This script has no parameters, so it can be easily added to the sudoers. When
119
-
run, it calls the main script with predefined parameters:
120
-
121
-
- deploy user: the owner of the current folder
122
-
- additional content folders: ../private and ../private-files
123
-
124
-
The script is an example, you can customize it for your hosting needs.
125
-
126
-
This repository also includes a sudoers file example to allow users to run the
0 commit comments