DARIODF
DARIODF

Reputation: 51

Permissions on /tmp/cache/assets on RAIL app

I have a permissions problem. Using wickedpdf on my rails app to print, it produces tmp assets files into the dir /tmp/cache/assets. The files that it writes, like this one sprockets%2F2c9f9e326ac1c7cd3f07a1a3c9051874 have owner="nobody" and permissions="rw--------" so the asset wickedpdf gives an error while printing.

It's possible to correct this with a simple chmod -R 777 /tmp but i can't do this everytime the asset produces a new subdirectory into /tmp with no permissions. It's possible to set tmp dir and its subdirectories and files with all permissions for ever, also for new files that my assets will produce in future?

Upvotes: 5

Views: 2379

Answers (2)

Jaswinder
Jaswinder

Reputation: 1525

There can be cache problems if you are using puma or rails very often.

I was facing same problem when switching from > puma to > rails s to start rails app.

Solution: You can delete cache for assets manually inside tmp/cache/ path

Upvotes: 0

Sarwan Kumar
Sarwan Kumar

Reputation: 1311

you can change permission for all the files and sub directories in temp/ directory,

like: chmod -R 777 /tmp/*

Upvotes: 1

Related Questions