blog:set_rights_of_files_in_public_html
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| blog:set_rights_of_files_in_public_html [2011-03-11 07:43] – brb | blog:set_rights_of_files_in_public_html [2011-03-11 07:57] (current) – brb | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Set rights of files in public_html ====== | ====== Set rights of files in public_html ====== | ||
| - | < | + | Set rights of user / |
| + | - all files/ | ||
| + | - group www-data is added g+r for files (webserver can read all files) g+rsx for directories (webserver can read and change into all directories) | ||
| + | - o-rights (for all) are completely removed, so shell users can't read files of other users (possibly containing passwords etc). | ||
| + | |||
| + | You can run the script using '' | ||
| + | |||
| + | Note: Users should be informed what happens, because a lot have taken the bad habit of doing chmod 755 to everything, and they will be confused if their files go back to 750 every hour. | ||
| + | |||
| + | Ref: http:// | ||
| + | |||
| + | < | ||
| #!/bin/bash - | #!/bin/bash - | ||
| # | # | ||
| Line 25: | Line 36: | ||
| # BUGS: --- | # BUGS: --- | ||
| # | # | ||
| - | # Author: Bernhard Brunner (bn), bernhard.brunner@epr.ch | + | # Author: Bernhard Brunner (bn), bernhard |
| # | # | ||
| # | # | ||
| Line 57: | Line 68: | ||
| fi | fi | ||
| done | done | ||
| - | </file> | + | </code> |
| - | + | ||
| - | Ref: http:// | + | |
| {{tag> | {{tag> | ||
blog/set_rights_of_files_in_public_html.1299825805.txt.gz · Last modified: 2011-03-11 07:43 by brb
