Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving an Image to a checklist fails to be stored on server's hard drive #28

Open
DanielCaspers opened this issue Mar 25, 2017 · 9 comments
Labels
bug Deployment Transferring builds from the dev's environment to where the customer wants it

Comments

@DanielCaspers
Copy link
Owner

DanielCaspers commented Mar 25, 2017

The folders "Uploads/Checklists/" and any similar folders weren't autogenerated on saving a picture. These folders should be 777 perms
Improve ImageService Implementation to create both directories prior to any save.

@DanielCaspers
Copy link
Owner Author

Commit 73d2533 should address this. Feel free to take a read of the changes if you like. In deploying to Nightly B, I saw a strange error regarding datetime conversion on fetching the list, which should be an independent action of this, so we may have database corruption issues.

@scaspers, could you blow away the DB so we can test again? Nightly-B should not have those missing folders and then should make them JIT on image save.

@scaspers
Copy link
Collaborator

scaspers commented Mar 26, 2017

Still having issues. Failed to create the "Uploads" directory so I manually created with perms 777 and tried again. Then...
image
Upon looking at the 'Uploads' directory, I found that it made the 'Checklists' directory with user 'apache' and perms 700 (read\write to owner only). The directory did NOT have the image stored in it. I am guessing that the image did not store due to the program failing before it had a chance. It probs made the directory and then tried changing perms and failed. ???
After changing owner and perms on the 'Checklists' directory I tried again and same error.

Would working with the linux database help? I could maybe open the firewall for you to the SQL server??

@DanielCaspers
Copy link
Owner Author

I was worried that would happen.... I'll be investigating what I can do in mono about this.

Directory.SetAccessControl() documentation

While not related to the exact exception above, if I could have access to work with the database directly and view it and operate on it like you did in the browser, that would be a big help not for this bug but for all the other database issues.

@DanielCaspers
Copy link
Owner Author

Here's the culprit in Mono's source... The stacktrace was actually helpful for a change!

I'll look to see if there is another way around that doesn't take much time for now; otherwise it might be something to revisit and solve in a different way than directly invoking that API and instead maybe run a script that does it or something.

Alternatively, I may start investigation of migrating to .NET Core in the near future, where all of these basics are implemented natively.

@scaspers
Copy link
Collaborator

@DanielCaspers
Copy link
Owner Author

This is gonna be a time sink, and both of us don't want me spending time on this right now. Lets kick this can a bit further down the road.

@scaspers , let me know which idea you prefer to run with from below. I'll need your help either way.

  1. I have folder creation working on every publish. I no longer delete everything on every publish, so we might be able to change folder perms and they may not be affected on new publishes. Not sure though, since perms structure is different across systems. So, could you change Nightly-B's folders to chmod 777.

  2. I've already created the folders. Just give apache or whatever access to do whatever it wants for now on those subdirectories using a terminal command? The server isn't crashing anymore, so it should just be once, and only ever redone on server reboots?

@DanielCaspers DanielCaspers changed the title Saving an Image to a checklist fails Saving an Image to a checklist fails to be stored on server's hard drive May 13, 2017
@DanielCaspers DanielCaspers added this to the v1.0 Feature Complete Loose Ends milestone Jul 6, 2017
@DanielCaspers
Copy link
Owner Author

@scaspers did I sell you on deferring this? Not trying to be pushy, just trying to manage the backlog!

@scaspers
Copy link
Collaborator

Yes we can defer. After we figure out how many checklists we might actually have we may even decide that a list view would be better.

@DanielCaspers
Copy link
Owner Author

@scaspers , agreed. If you decide you think the list view would be better, I'm thinking I could make that swap in a long evening at worst so if you sense a need to change the UI for that, we can work that out for V1.

@DanielCaspers DanielCaspers added Future Feature Deployment Transferring builds from the dev's environment to where the customer wants it labels Jan 28, 2018
@DanielCaspers DanielCaspers removed this from the v1.0 Launch Loose Ends milestone Jan 28, 2018
@DanielCaspers DanielCaspers added this to the v1.1 milestone Mar 27, 2018
@scaspers scaspers modified the milestones: v1.1, v2.0 Apr 26, 2018
@DanielCaspers DanielCaspers removed this from the v2.0 milestone Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deployment Transferring builds from the dev's environment to where the customer wants it
Projects
None yet
Development

No branches or pull requests

2 participants