Before asking for help please read "How to request help" by clicking on that tab above here."
Solved Ownership and Permissions
- ricklach
- Topic Author
- Visitor
Rick
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
But probably not files created in /data/, which are probably also owned by www-data...
Group "www-data" isn't default behaviour, so I'm guessing you've done this to enable the auto-upgrade?
But after auto-upgrade, the newly created files will be owned by www-data.
You may have been better changing everything to be owned by www-data.
You can then simply set all files to 644 and all folders to 755.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Change the Owner from "me" to "www-data" for all folders in the root of the web called webtrees (or should I do it for all folders within WWW?)
Ensure that the Group is also "www-data"
Change permissions of all folders to 755
Change permissions of all files to 644
I believe the command to accomplish the ownership change would be "chown -Rv www-data:www-data webtrees" (or www if I were to apply it to the root). I am not sure how to change the permissions of all folders to 755 in a single command and all files in a folder to 644 - can you help me on that one?
Thanks for the help.
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
ricklach wrote: Before I make the changes I want to be sure that I am understanding everything you have said:
Change the Owner from "me" to "www-data" for all folders in the root of the web called webtrees (or should I do it for all folders within WWW?)
Ensure that the Group is also "www-data"
Change permissions of all folders to 755
Change permissions of all files to 644
Thanks for the help.
You've given very little information about what you want to achieve by these changes. For example, you've not said that anything is broken, or that you want to allow webtrees to self-update, or that you want to maximise security, etc.
You've not said whether you host other sites/applications, and whether these need to be isolated.
So, I'll assume that your server only runs webtrees, and that you are making these changes to enable self-updating on apache/mod-php
I guess you are planning to run commands such as
sudo chown -R www-data /var/www/html
sudo chgrp -R www-data /var/www/html
sudo find /var/www/html -type f -exec chmod 644 {} \;
sudo find /var/www/html -type d -exec chmod 755 {} \;
If your site is currently working, then after these changes it should continue to work
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
I made the changes and as you predicted the website worked just fine with two small exceptions. On my opening page I have two graphic images that used to show up but have now disappeared. I have checked out their permissions and they are the same as all other media files. The path and file names remained the same but they just don't appear on the page inside one of the HTML containers. Can you suggest an obvious solution?
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
You shouldn't do this. The /data/ folder is intended to contain private information that shouldn't be accessible over the internet.
There's a file /data/.htaccess which is (correctly!) blocking direct access to these files.
You should, instead, use the URL from the media object. e.g. dev.webtrees.net/demo-dev/mediafirewall.php?mid=m1&ged=demo
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Type the filename into the search box.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
One of these (unused media files) will list files that do not have a corresponding media object.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
You are the man! Thanks for that help - a day without anything new learned is a day wasted.
Rick
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Visit the page of the media object, and look at the URL bar in your browser.
Or, hover your mouse over the link to the media object, and the URL will (depending on your browser) be shown in the status bar at the bottom.
> I have a list of path names that I do not associate with my media and no path names that are associated with my media. How do I amend that dropdown list?
It is generated automatically from the existing media objects. If there are no media objects that use a folder, it will not be included in the list.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- Tel
- Offline
- New Member
Terry
running webtrees 2.1.16 at mynorfolkancestors.net
on PHP 8.2, MySQL 5.7.
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Problem solved - I renamed the offending file and that did the trick.
Please Log in or Create an account to join the conversation.
- ricklach
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- Tel
- Offline
- New Member
Terry
running webtrees 2.1.16 at mynorfolkancestors.net
on PHP 8.2, MySQL 5.7.
Please Log in or Create an account to join the conversation.