On Fri, Mar 15, 2013 at 7:41 AM, Jussi Hirvi <jushi...@gmail.com> wrote:
> I am learning RoR on CentOS 5. What would be the ideal way to set
> permissions in the app folder? The rails default did not work for me.
>
> I use git and apache/passenger. Everything works now that I
> - added apache to the group git (by modifying /etc/group)
> - did the following at tha app root
>    chown -R root:git *
>    chmod -R 775 *
>
> Howerer, this is probably too wide.
>
> It seems to me that somebody else is using the view templates besides
> apache, because 770 gives an error. Or else Passenger does not respect the
> fact that apache was added to the git group.

Passenger runs as the user and group Apache runs as.  That said you
should not need to add the executable bit to any Ruby file unless it's
a bin file, Ruby is not PHP (actually that always kinda annoyed me
about PHP a bit :/..) That said, even if Apache was added to the git
group that does not mean that Apache will run with the git group since
Apache sets it's user and group. Your best bet in that situation is to
set the group via configurations. I don't know how CentOS sets up
Apache so you'll have to grep that out.

On the permissions part, I would probably set it up as 640.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to