> # Set correct permissions on new file
> chown(old_stat.uid, old_stat.gid, file_name) ##### <-- delete
> this line
> 
> 


This line was added deliberately.  Prior to its inclusion the files had the 
ownership and group information of the file returned by Tempfile, which was 
almost always wrong (e.g. the www-data user couldn't read it).  Now those 
values get copied across from the directory in question which means that you 
can safely use atomic_write to generate assets that are served by your web 
server, you just need to make that directory's group www-data and add the 
running user as a member of that group.

I've no idea why you want to separate deploying and running users but you 
should be able to work around this by setting the ownership of the relevant 
directory at deploy time to the values you want rails to maintain.  Removing 
that line seems much more likely to break things for the majority.

--
Cheers,

Koz
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to