Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have to access/write directories through php that are created by tomcat by upload process.

php apache:apache cant able to access tomcat:tomcat directories.

Please tell me what i should change to work it out.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

One option is to put the apache user in the tomcat group. Another option is to create a new group, say webusers, in which you put both the apache and the tomcat users, and to which you assign the group ownership of the affected tomcat directories.

The affected tomcat directories will then have to be writable by group. It's probably also a good idea to add the setgid bit, making sure new files and directories are created with the right group ownership.

Also remember to set an umask inside the involved scripts, to get the desired permissions on new files and directories. I guess you want 002 or 007, depending if the files should be accessible by any user or not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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