• Resolved cbonallo

    (@cbonallo)


    We have deployed your plug-in network wide and have run into an error from your Import function. Remember I reported the forbidden access error and you said that your plug-in does not manage directory permissions. Well, it does, in a way. If you recall, I modified the .htcaccess file to fix this issue in test.

    Old .htcaccess file

    Deny from all

    Options +Indexes

    New file

    Options +Indexes

    Well, before I notified our website owners of the new plug-in and how to do the import to WP Docs, I went into the directories and “fixed” all the mdoc directories to avoid this issue by editing the .htcaccess file. I was very surprised to learn that after the import is complete, the .htcaccess file was over written with the old code (Deny all from) and even further, the file permissions was set to 660! So there was no public read permission either. The error was back. Now I’m going to have to schedule a support call with each webmaster and fix the permissions.

    Your import code is changing the .htcaccess file causing this error. Please can you look into this and fix it?

    Thank you so much! We really want to use your plug-in but can’t until this is resolved.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Are you sure that .htaccess file is created by my plugin script? I think we are missing something here.

    Thread Starter cbonallo

    (@cbonallo)

    I can only tell you what happened. In test we reported the issue after trying the import. In production, I was proactive to avoid the access errror. Steps I took are as follows:

    1. I went into each sites mdocs folder and modified the .htcaccess file and replaced the Deny access all command with the filtered php version I shared with you.
    2. I did this for every site in our network.
    3. I then ran the WP Docs Import on the main site and found the error
    4. I then opened the previously modified .htcaccess file and the Deny access all command was back; which I reported to you. So I modified the file again, but it still gave the error when accessing files. You said to contact my hosting support, so I did.
    5. They discovered that the permission to read the .htcaccess file were also altered and were now 660. Once they changed those permissions back to 644 the error went away.
    6. So I worked with another webmaster on another site and had them do the WP Docs Import. Same thing occurred.
    7. I checked some of the other site that had not run the import yet and the .htcaccess file modifications I made were still there.
    8. The I did it again on a test site and double checked just before and after the state of the .htcaccess file. Same thing happened.

    So I am absolutely sure the file is getting changed when the WP Docs Import is ran. How and why it is occurring, I have no idea. That’s why I asked you to look into it. Could your code be triggering a directory reset? Triggering a malicious code protective response from the server? I am not a wordpress developer and have no clue.

    • This reply was modified 1 year, 3 months ago by cbonallo.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    The only thing I found in my plugin script is as follow:

    1) We recommend deactivation of Memphis Documents Library after import.)
    2) Memphis Documents Library .htaccess file in mdocs directory will not let you browse the files on front-end.
    3) We are deleting the .htaccess file

    So I have double checked, we are not copying/creating the .htaccess file and also not resetting the directory permissions. Please keep the problem description short, it takes time read.

    Thread Starter cbonallo

    (@cbonallo)

    I can only report what is happening. If you are deleting the file then something is putting it back immediately. Deactivating the Memphis docs plug-in would not change that and is impractical since every site has to do the import and I cannot force them to do it instantly.

    It appears the system is reacting to the deletion of the .htaccess file. Could you not just replace it with Options +Indexes as the only content? Would that fix this issue?

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    You are not understanding this technical aspect that my plugin is not modifying any file’s read/write permissions, actually my plugin is not creating any .htaccess file. WP Docs plugin only linking the files which are uploaded in WordPress Media Library. Memphis plugin was creating the directories and during the import functionality I discovered that it is mandatory to deactivate it immediately after the import. Instead of following the instructions given, you are asking me to modify in my plugin. Kindly do not make it complex, just deactivate memphis after import activity completed else .htaccess will come back by memphis.

    Thread Starter cbonallo

    (@cbonallo)

    Oh, yes I do. But design has to meet reality. These sites ae in production. Memphis Docs is Network Activated. I cannot deactivate the Memhpis Docs plug-in until all 20+ websites are done doing the import, creating new WP Docs pages, one at a time, on their own time table. I gave them a reasonable time frame, 30 days to make the changes. Again, if another program is putting the .htaccess file back then it would not do that if you don’t delete it, but, instead modify it. I know because none of my modified .htaccess files have been changed.

    • This reply was modified 1 year, 3 months ago by cbonallo.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    You are again misunderstanding the things, try to understand that my plugin simply links the WordPress media library files to your logically created directories and sub-directories. Neither it creates any files or directories, so we don’t need any kind of .htaccess file as the WordPress is managing its uploads directory very well. WordPress is secure and sufficient for your files security, memphis was designed to create separate directories and was protecting the files with the .htaccess etc.

    Please do not drag this issue, as it is not directly related to the WP Docs plugin. That is your custom requirement like you cannot deactivate the plugin as you are working on multiple websites. In case you need any kind of custom solution, you can either hire a developer for this or request the plugin developer to work for you separately but it has nothing to do with the existing plugin functionality or basic version features. I hope you understand, these replies take time and grab attention. Value your time and other’s too.

    Thread Starter cbonallo

    (@cbonallo)

    We will have to disagree. If I run your Import the program breaks. That is reality. Does this before I can deactivate Memphis Docs. Your program delete .htaccess file so responsible for system reaction. Simple.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    If you agree that this is an opensource script, so please contribute in it instead of arguing here. The best I could provide was an arrangement like I explained before, you should come up with another improvement. Do not try to inject your custom development requirement as a bug report for this plugin. I appreciate your cooperation.

    Thread Starter cbonallo

    (@cbonallo)

    Also, two reports of Import using up all resources and sites going down temporarily.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Do you think it is also related to this plugin? Don’t you consider the number of files and the queries involved in it? I would suggest you to hire a developer so he can better explain you the things. Please.

    Thread Starter cbonallo

    (@cbonallo)

    Just reporting what is happening. Our hosting company is investigating. I’ll post what they say the cause of the resource overload was.

    I have 31 years in IT department on different platforms. I am well aware of what is possibly the cause and what poorly designed database queries can do. If there is a minimum resource requirement it should be stated. At the least the free version is not using Ajax server calls so there is that.

    I think to sites ran the import at the same time during peak hours.

    • This reply was modified 1 year, 3 months ago by cbonallo.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    I am not understanding that why are you posting irrelevant stuff here? When it has been discovered that .htaccess file was added by memphis and that is the root cause for which you created this support thread, then why are you dragging it multiple directions? Please come up with a solution and I will add your provided improvement in the plugin with credits, this is how opensource world grows. I appreciate your contributions.

    Thread Starter cbonallo

    (@cbonallo)

    I did provide solution. Do not delete .htaccess file on Import. Instead, modify it and remove first line: Deny access all. Then Memphis Docs does not put new .htaccess file out in directory after WP Docs import.

    As for the resource usage, I’ll see if my hosting company can setup user quotas.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Solution should be in form of script, you just gave an advice.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Import Memphis Docs bug’ is closed to new replies.