On Friday, March 15, 2013 3:33:39 PM UTC+2, Jordon Bedwell wrote:
>
> Passenger runs as the user and group Apache runs as.
I once got an error message which implied that the db dir should be
accessible to the user nobody:nobody - and my apache is set to run as
apache:apache. I haven't tested this, though. As a temporary solution my
db directory is now world-writable.
> 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 :/..)
I had the exec bit on only because of directory access. I was too lazy to
adjust separately for files and directories.
> 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.
>
Let's see... I switched the group assignments so that now git is a member
of apache group (and not vice versa). Both apache and git seem to work ok.
Also I made this bash script which I run now and then. So far I am good
with this. The permissions are not quite optimal, though. For example I
don't like world-writable directories.
# this file should be at the project root
myproj='.'
# basic settings
chgrp -R apache $myproj;
chmod -R 774 $myproj;
# project dir
chmod o+x $myproj;
# subdirs and their contents
find $myproj/* -type d -exec chmod 2775 {} \;;
chmod -R 777 $myproj/db $myproj/tmp;
chmod 666 $myproj/log/*;
- Jussi
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/8Y6E2CY5G-0J.
For more options, visit https://groups.google.com/groups/opt_out.