- Posts: 3
Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
Question Unable to write to /var/www/data
- rodcastler
-
Topic Author
- Offline
- New Member
-
Less
More
2 weeks 5 days ago - 2 weeks 5 days ago #1
by rodcastler
Unable to write to /var/www/data was created by rodcastler
Hello,
I am attempting to copy my current install to a new server.
The new server is a docker container on Nginx, per the following steps:
GitHub - richardeigenmann/Webtrees-Docker: Run webtrees Genealogy in 3 Docker containers
The setup runs fine until I get the following error:
=============================================
/var/www/data
Oops! webtrees was unable to create files in this folder. This usually means that you need to change the folder permissions to 777.
=============================================
No mater if I do as indicated, the error persists preventing the installation. I've also tried to change ownership of the folder to www-data, still with no avail.
I can tell webtrees is able to create the file "test.txt", a zero-length file that remains there until I manually delete it, but it seems like it's unable to write to it or delete it. What could be causing this issue?
I also get the warning:
===============================
The PHP extension "exif" is not installed.
===============================
But I'm not sure if it could be related to the issue stated above.
Thank you for your guidance.
I am attempting to copy my current install to a new server.
The new server is a docker container on Nginx, per the following steps:
GitHub - richardeigenmann/Webtrees-Docker: Run webtrees Genealogy in 3 Docker containers
The setup runs fine until I get the following error:
=============================================
/var/www/data
Oops! webtrees was unable to create files in this folder. This usually means that you need to change the folder permissions to 777.
=============================================
No mater if I do as indicated, the error persists preventing the installation. I've also tried to change ownership of the folder to www-data, still with no avail.
I can tell webtrees is able to create the file "test.txt", a zero-length file that remains there until I manually delete it, but it seems like it's unable to write to it or delete it. What could be causing this issue?
I also get the warning:
===============================
The PHP extension "exif" is not installed.
===============================
But I'm not sure if it could be related to the issue stated above.
Thank you for your guidance.
Last edit: 2 weeks 5 days ago by rodcastler.
Please Log in or Create an account to join the conversation.
- rodcastler
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
2 weeks 5 days ago #2
by rodcastler
Replied by rodcastler on topic Unable to write to /var/www/data
One additional piece of information:
The only out of the ordinary thing that called my attention is that instead of using the "Webtrees-Data" volume I created per the instructions, the script creates a new one named "webtrees-docker_webtrees-data" and seems to bind the container to this volume instead.
The only out of the ordinary thing that called my attention is that instead of using the "Webtrees-Data" volume I created per the instructions, the script creates a new one named "webtrees-docker_webtrees-data" and seems to bind the container to this volume instead.
Please Log in or Create an account to join the conversation.
- fisharebest
-
- Offline
- Administrator
-
2 weeks 5 days ago #3
by fisharebest
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Replied by fisharebest on topic Unable to write to /var/www/data
I have no significant experience of docker, but if
> I've also tried to change ownership of the folder to www-data, still with no avail.
then it is possible that this is a read-only filesystem.
Perhaps with docker you must create a read-write filesystem for your persistent data, and mount it at that point?
> I've also tried to change ownership of the folder to www-data, still with no avail.
then it is possible that this is a read-only filesystem.
Perhaps with docker you must create a read-write filesystem for your persistent data, and mount it at that point?
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- bertkoor
-
- Offline
- Platinum Member
-
- Greetings from Utrecht, Holland
2 weeks 5 days ago #4
by bertkoor
stamboom.BertKoor.nl runs on webtrees v1.7.13
Replied by bertkoor on topic Unable to write to /var/www/data
Oh no... I wrote a lengthy response only to find out upon submittal that my session had expired.
In short, I'd try this setup: github.com/NathanVaughn/webtrees-docker
What I see is that two out of the three containers download the webtrees distribution zip and unzip it into the same location. I think there's already a rudimentary data folder in there, so whatever container was first will be the owner.
Also you can try to copy the line containing "chmod 777 /var/www/data" from Dockerfile-php into the Dockerfile (of the nginx container) which does the same as what's described in the readme at the bottom of the shell commands code snippet:
In short, I'd try this setup: github.com/NathanVaughn/webtrees-docker
What I see is that two out of the three containers download the webtrees distribution zip and unzip it into the same location. I think there's already a rudimentary data folder in there, so whatever container was first will be the owner.
Also you can try to copy the line containing "chmod 777 /var/www/data" from Dockerfile-php into the Dockerfile (of the nginx container) which does the same as what's described in the readme at the bottom of the shell commands code snippet:
Code:# If you get an error about the permissions log into the container and correct them docker exec -it Webtrees_webserver bash root@827bbf76cde7:/# chmod 777 /var/www/data
stamboom.BertKoor.nl runs on webtrees v1.7.13
Please Log in or Create an account to join the conversation.
- rodcastler
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
2 weeks 5 days ago #5
by rodcastler
I appreciate your time and effort. I'll check your suggestions and will let you know.
So far, I've tried mounting the whole volume /var/www/data/ into another drive and it can write now, but I'm having some issues connecting to the DB.
I'll give the Nathan Vaughn setup a try....
Replied by rodcastler on topic Unable to write to /var/www/data
Oh no... I wrote a lengthy response only to find out upon submittal that my session had expired.
I appreciate your time and effort. I'll check your suggestions and will let you know.
So far, I've tried mounting the whole volume /var/www/data/ into another drive and it can write now, but I'm having some issues connecting to the DB.
I'll give the Nathan Vaughn setup a try....
Please Log in or Create an account to join the conversation.