Instruct user to change ownership / group
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently during the install, there are instructions for the user to change permissions to 775 for non-writable directories but not change the ownership or group the files / directories belong too.
This is a issue when the user (standard user) used to download the files is not the same user (webserver user) needing write access
The installer should additionally instruct the user to either
- Change the owner to the webserver (php) user
- Change the group to the webserver (php) user
Changing the ownership is easier and a more common instruction (sudo chown -R www-data:www-data flarum/dir) and will solve the problem but requires root privileges and isn't "best practice"
Changing the group doesn't require root access (as long as the user belongs to the group they are changing the group too. In this case, belongs to group www-data)
ideally instructing the user to chgrp to non-writable directories or the entire flarum directory would work. www-data is not the user in all cases. Can this be detected?
Eg:
Please run
chgrp "www-data" "/home/user/flarum/"
chgrp -R "www-data" "/home/user/flarum/assets" "/home/user/flarum/extensions" "/home/user/flarum/storage"
or
Please run
chgrp -R www-data /home/user/flarum/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the installer's existing instructions for non-writable directories and review how they describe permission changes. Determine whether the installer can reliably identify the relevant webserver user or group, then update the instructions to cover ownership or group changes without assuming www-data. Done means the guidance addresses the stated writable directories and the available privilege constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devops, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100