fredemagi
8 months ago
1167
3
Forge

How to set folder permissions for public users' folder?

Posted 8 months ago by fredemagi

I'm making an app where people can sign up, edit their user's profile etc. When people I sign up, I make a new folder for their images like this:

Storage::disk('public')->makeDirectory('user-images/'.$external_id);

user-images is located in storage/app/public. A symbolic link connects the path with public/storage. However, when new users signs up, either the new folder is created, nor can they upload images. I think it has something to do with wrong persmissions.

I'm fairly new to Laravel Forge which I use along with Digitalocean. What do I do to allow this? Can I change something in the code, or do I have to set permissions somewhere?

Please sign in or create an account to participate in this conversation.