laravel-tus-upload icon indicating copy to clipboard operation
laravel-tus-upload copied to clipboard

Fix execution permissions

Open vmrfriz opened this issue 5 months ago • 1 comments

Problem: When starting with tus:start and trying to upload a file, I got errors in the console saying that the pre-create file wasn't executable. The solution was to manually execute chmod +x vendor/oneofftech/laravel-tus-upload/hooks/*.

The error when uploading looked like this:

ERROR output -----------------
[tusd] 2025/07/26 04:36:12 event="HookInvocationError" type="pre-create" id="" error="master/exec /var/www/laravel/vendor/oneofftech/laravel-tus-upload/hooks/linux/pre-create: permission denied"

Now, when starting tus:start, it will be checked that the hooks/linux/* files have execution rights. If there are no rights, they will be given.

Perhaps I was too hasty by not checking for the operating system and not testing on Windows. But I decided to leave it here for your comments or revision.

vmrfriz avatar Jul 26 '25 01:07 vmrfriz

Thanks for your contribution! I'll check it out as soon as I can

avvertix avatar Jul 31 '25 07:07 avvertix