ucla-oarc-mobile / mwf

UCLA Mobile Web Framework
http://mwf.ucla.edu
Other
86 stars 25 forks source link

cache mkdir() permission problem? #162

Closed BerkeleyEdu closed 12 years ago

BerkeleyEdu commented 12 years ago

Hi,

I see this error:

Sep 1 07:32:21 as-mobile-qa httpd[3125]: [error] [client 24.130.86.33] PHP Warning: mkdir(): Permission denied in /var/www/html/mwf/root/assets/lib/disk_cache.class.php on line 59, referer: http://m-qa.berkeley.edu/

but the permissions on the var directory look correct to me? drwxrwxr-x 2 app_relmgt webmaster 4096 Aug 10 10:36 var

Do I need to set it in base.ini if I am using "var" ?

-Sara

Trott commented 12 years ago

Those would be the correct permissions if your web server (httpd) is running as user app_relmgt (which I doubt) or is in group webmaster (which it probably isn't).

If I recall correctly, you're running either RHEL or CentOS. I'm pretty sure the default httpd user:group will be apache:apache. (You can check by logging on to the server and running ps -ef | grep httpd | grep -v grep. You should see one process owned by root and a bunch of other processes owned by another user. That other user is the one you want. You can find the groups that other user belongs to by running groups <user>.)

You'll need to either chown or chgrp (or have a sysadmin do it if you don't have administrative privileges) on var so that write is permitted for the user (use chown for that) or one of the user's groups that the user belongs to (use chgrp for that).

BerkeleyEdu commented 12 years ago

Rich,

I've submitted a request to the sysadm to "chown apache var"

Thanks!

-Sara

On 9/1/12 9:06 AM, Trott wrote:

Those would be the correct permissions if your web server (httpd) is running as user app_relmgt (which I doubt) or is in group webmaster (which it probably isn't).

If I recall correctly, you're running either RHEL or CentOS. I'm pretty sure the default httpd user:group will be apache:apache. (You can check by logging on to the server and running |ps -ef | grep httpd | grep -v grep|. You should see one process owned by root and a bunch of other processes owned by another user. That other user is the one you want. You can find the groups that other user belongs to by running |groups |.

You'll need to either |chown| or |chgrp| (or have a sysadmin do it if you don't have administrative privileges) on |var| so that write is permitted for the user (|chown|) or one of the user's groups that the user belongs to (|chgrp|).

— Reply to this email directly or view it on GitHub https://github.com/ucla/mwf/issues/162#issuecomment-8214189.

Trott commented 12 years ago

For the benefit of observers who may not be familiar with the MWF file structure: We're talking about mwf/var inside of the MWF installation, not /var that's used by the operating system etc.