mardi 30 octobre 2018

how to delete by owner and read to anyone on laravel nginx login

When I register two users on laravel (on MySQL DB user table) upload a file separate by two users. On Ubuntu Cmd $ls -alh. The file owner all shows www-data:www-data no matter who's the user upload. I has already set the folder to 755 and the file to 644.
So how can I identify which user has the right to delete the file he uploaded and prevent the other user to delete the file because files all show the same owner on Linux system? Purpose: 1.everyone can read the file in the folder 2.register users can upload file to the folder 3.register user can only delete the file he upload

What's the confused point I got ? Can the loginer can have the file ownership and can be restrict by the 644 permission?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2CRFzjL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire