How do I resolve an issue of permissions in apache. The initial task that I am trying to get working is to upload a mura plugin the the temp directory of ColdFusion9. However, I have since discovered that this issue isn't a ColdFusion issue.

ColdFusion is running as the apache user:

# ps aux | grep coldfusion
apache   31016  0.0  0.0   2104   664 ?    S    Oct27   0:00 /opt/coldfusion9 ...
apache   31017  0.7 24.5 933260 513976 ?   Sl   Oct27  18:02 /opt/coldfusion9 ...

Apache has access to the directory that I'm attempting to write to:

# namei -m /opt/coldfusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/
f: /opt/coldfusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/
 drwxr-xr-x /
 drwxr-xr-x opt
 drwxrwxrwx coldfusion9
 drwxrwxr-x runtime
 drwxrwxr-x servers
 drwxr-xr-x coldfusion
 drwxr-xr-x SERVER-INF
 drwxr-xr-x temp
 drwxr-xr-x wwwroot-tmp

# ls -la /opt/coldfusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/
total 8
drwxr-xr-x 2 apache apache 4096 Oct 28 15:46 .
drwxr-xr-x 3 apache root   4096 Oct 27 21:33 ..

There are no extended attributes assigned to the directory:

#lsattr /opt/coldfusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/
------------- /opt/coldfusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/afile

I changed the shell (temporarily) of the apache user to bash, logged into the shell and was able to write to the directory.

Selinux is disabled.

fixweb has been run.

I created two scripts, tmp.cfm and tmp.php, which simply attempted to write a file in the target directory, browsed to the tmp scripts in the browser and both were unable to write to the directory.

I also created an alias to the directory in apache:

Alias /atemp /target-dir
<Location /atemp>
Order allow,deny
Allow from all

Restarted apache and was still unable to get access to this directory.

I've seen a similar permission issue when working with Wordpress.

I suspect that this is something to do with my apache binary but I haven't heard back from the providers of that binary, so I was hoping to get some assistance from a larger audience.

Edit: I'd be open to other possible problems that would cause this that I haven't considered.

  • Do you have any <Directory "/opt/coldfusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp"> (or a parent directory thereof) that might be granting or removing access? – MadHatter Oct 29 '10 at 16:50
  • No. Double checked to make sure. – frogstarr78 Oct 29 '10 at 16:54

Turns out it was an Adobe ColdFusion 9 issue after all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.