Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bad idea to create a folder for every user?

Tags:

php

apache

I am wondering if it would be a bad idea to create a folder for every user. So any images for each user would be accessed with img.mysite.com/UserId/image.jpg

like image 534
Justin Carlson Avatar asked Dec 21 '22 08:12

Justin Carlson


1 Answers

Absolutely bad idea I will say from my experience
In recent past I was working on one application which was based on social networking
And It has around 15000+ users now.

Also I am managing that site currently.

Problems with this is you will find it cool at first to manage but later it will be a issue.
Always have to keep track of permissions.
Creation and deletion of folder with respect to your database to achieve synchronisation.
Also If you are on shared hosting, many hosting providers they don't show all the folders with any File Manager.Maximum number of folder that can be seen through File Managers is 2000 with customer care support you only get access to first 10000 folder. Also Non-Ascii name for folder will as that of database will be another issue.

Which will be a great problem for you later.

I will suggest not to go with this way for sure.

like image 136
Wazy Avatar answered Dec 30 '22 22:12

Wazy