easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

bindfs + shared hosting

Open rahul286 opened this issue 9 years ago • 6 comments

I came across http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/ by Robert Wilde (@mrwilde on ee-slack)

It might be an interesting approach to solve shared hosting problem.

rahul286 avatar Jan 25 '17 18:01 rahul286

If you are going to use 770 permission, then simply add your user to the www-data group and you will achieve the same end result.

MiteshShah avatar Jan 26 '17 06:01 MiteshShah

Kind of the point is that you should not be using 770 on your WordPress install. Folders should be 755 and files 644. BindFS setup takes less than 60secs and provides controllerable abstraction wich works well, espcially if you have multiple people accessing the server for development

robwilde avatar Jan 26 '17 07:01 robwilde

@rahul286 It creates more problem then its solve the issue. First, If we have 30 WordPress application on a single server, that means 30 fstab entry. Ans single typo mistake and reboot your server will never come back without rescue mode.

Also, 770 or 775 will solve our problem and for the better solution, we can use Sticky/SGID bits for special permission.

For developer point of view its seems nice solution but as a Linux Admin I really dont like fstab entry and force mount.

MiteshShah avatar Jan 26 '17 07:01 MiteshShah

I just did a test on a production server. Instead of 770 I used 644:a+x in the fstab entry. There were no errors at all, all permissions were kept correct for www-data user.

I agree with @MiteshShah however: if you have one user it is one thing; if you have 30 or 150 (as a customer of mine, he has 4 servers with 150 domains each), well, it's another story.

janiosarmento avatar Jan 26 '17 17:01 janiosarmento

I like where this is going and I'm glad you are seeking solutions and input on this. I've seen some really complicated suggestions in another thread that could actually work, but most of them involved running more services and making some major config changes for each site.

Hopefully something from this thread will achieve the goal with less resources and I'm interested to hear back from anyone who has tested a solution with your results! ;)

MattyLB avatar Feb 14 '17 06:02 MattyLB

Sorry for a delayed reply. The way we are using Docker in v4, this issue can be termed obsolete now.

With Docker, we will have a separation between execution environment for each site.

We will need to revisit shared hosting from a totally different perspective in future. I hope it will be easier to deal with in Docker world! 🤞

rahul286 avatar Jun 02 '18 12:06 rahul286