Laravel 5 Scheduler Caching permission issue
up vote
0
down vote
favorite
I have a scheduler which caches to file.
This data is then picked up by a user when they visit a particular page.
The issue I'm having is that the scheduler is saving to the cache with the user ubuntu and the user is trying to pull this from the cache with the www-data user which leads to file permission problems.
Anyone have a decent solution to this other than setting a crontab to periodically update the cache folder permissions?
php laravel-5
add a comment |
up vote
0
down vote
favorite
I have a scheduler which caches to file.
This data is then picked up by a user when they visit a particular page.
The issue I'm having is that the scheduler is saving to the cache with the user ubuntu and the user is trying to pull this from the cache with the www-data user which leads to file permission problems.
Anyone have a decent solution to this other than setting a crontab to periodically update the cache folder permissions?
php laravel-5
1
Why don't you place ubuntu and www-data in the same user group?
– Joe
May 24 '17 at 10:24
I could, but I was hoping to find a solution within Laravel. Some way of setting the user:group if possible.
– johnmccuk
May 24 '17 at 10:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a scheduler which caches to file.
This data is then picked up by a user when they visit a particular page.
The issue I'm having is that the scheduler is saving to the cache with the user ubuntu and the user is trying to pull this from the cache with the www-data user which leads to file permission problems.
Anyone have a decent solution to this other than setting a crontab to periodically update the cache folder permissions?
php laravel-5
I have a scheduler which caches to file.
This data is then picked up by a user when they visit a particular page.
The issue I'm having is that the scheduler is saving to the cache with the user ubuntu and the user is trying to pull this from the cache with the www-data user which leads to file permission problems.
Anyone have a decent solution to this other than setting a crontab to periodically update the cache folder permissions?
php laravel-5
php laravel-5
asked May 24 '17 at 9:57
johnmccuk
14617
14617
1
Why don't you place ubuntu and www-data in the same user group?
– Joe
May 24 '17 at 10:24
I could, but I was hoping to find a solution within Laravel. Some way of setting the user:group if possible.
– johnmccuk
May 24 '17 at 10:26
add a comment |
1
Why don't you place ubuntu and www-data in the same user group?
– Joe
May 24 '17 at 10:24
I could, but I was hoping to find a solution within Laravel. Some way of setting the user:group if possible.
– johnmccuk
May 24 '17 at 10:26
1
1
Why don't you place ubuntu and www-data in the same user group?
– Joe
May 24 '17 at 10:24
Why don't you place ubuntu and www-data in the same user group?
– Joe
May 24 '17 at 10:24
I could, but I was hoping to find a solution within Laravel. Some way of setting the user:group if possible.
– johnmccuk
May 24 '17 at 10:26
I could, but I was hoping to find a solution within Laravel. Some way of setting the user:group if possible.
– johnmccuk
May 24 '17 at 10:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I've run into this problem also. I've resolved this by running the artisan queue: commands as the user that owns the files. For example:
sudo -u apache ./artisan queue:restart
or
sudo -u apache ./artisan queue:flush
This prevents permissions issues since my apache user owns the storage directory and writes all the files.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I've run into this problem also. I've resolved this by running the artisan queue: commands as the user that owns the files. For example:
sudo -u apache ./artisan queue:restart
or
sudo -u apache ./artisan queue:flush
This prevents permissions issues since my apache user owns the storage directory and writes all the files.
add a comment |
up vote
0
down vote
I've run into this problem also. I've resolved this by running the artisan queue: commands as the user that owns the files. For example:
sudo -u apache ./artisan queue:restart
or
sudo -u apache ./artisan queue:flush
This prevents permissions issues since my apache user owns the storage directory and writes all the files.
add a comment |
up vote
0
down vote
up vote
0
down vote
I've run into this problem also. I've resolved this by running the artisan queue: commands as the user that owns the files. For example:
sudo -u apache ./artisan queue:restart
or
sudo -u apache ./artisan queue:flush
This prevents permissions issues since my apache user owns the storage directory and writes all the files.
I've run into this problem also. I've resolved this by running the artisan queue: commands as the user that owns the files. For example:
sudo -u apache ./artisan queue:restart
or
sudo -u apache ./artisan queue:flush
This prevents permissions issues since my apache user owns the storage directory and writes all the files.
answered Nov 21 at 18:51
Patryk J
12
12
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44155046%2flaravel-5-scheduler-caching-permission-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why don't you place ubuntu and www-data in the same user group?
– Joe
May 24 '17 at 10:24
I could, but I was hoping to find a solution within Laravel. Some way of setting the user:group if possible.
– johnmccuk
May 24 '17 at 10:26