Support the ongoing development of Laravel.io →
posted 9 years ago
Queues
Last updated 2 years ago.
0

In jobs the path '/' doesn't refer to public folder.It refers to root folder of your system or 'to root folder server in hosting'.

So give the path of the file considering its path in the system or server.Then it works.

Example:

In my system I got vagrant installed.I vagrant i got folder code and in that i have laravel app name "develop".

So the gave the file path as "/home/vagrant/code/develop/public/file". Then it worked.

Last updated 8 years ago.
0

I am also having the same issue when creating the file in the job(without ShouldQueue) no error it creates the file, but when I use a queue for the Job permission error. Any solution ?

0

What user is running your queue worker? It sounds like it's not the same user that owned the files.

Instead of thinking of it as running the worker with different file permissions, it's likely running the worker as a different user who doesn't have permission to read/write to the relevant files.

How you set the user depends on how your queue workers are being run (supervisord?) and what user it needs to be set to depends on the permissions of the files being worked on (what user owns them and if the owning user has permissions to read/write to those files).

Here's some more explanation on users and permissions in Linux: https://serversforhackers.com/c/permissions-and-user-management

0

Sign in to participate in this thread!

Eventy

Your banner here too?

hughgrigg hughgrigg Joined 19 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.