Help me- Apache cannot access mounted folder

Please help me in this trouble,

I use CentOS4.2 with Apache. For the future purpose, I create one Partition for storing data, I mounted it with one folder in (/) . but HTTPD cannot access (read/write) in this mounted folder.

Please, please help me

5 Replies

Did you set the permissions on the folder to give access to the user Apache runs as?

-James

Do you have selinux enabled? If so, you can use the chcon command with the –reference=/var/www flag to fix it up. Then either reroll the directory/files in the directory or use chcon -R to fix up what's under it.

http://wiki.centos.org/HowTos/SELinux

Also, not related to selinux or your problem, but I move some of my data directories under a separate partition and then remount the dirs in fstab so the structure stays the same. Kinda like a symlink but more transparent. It also simplifies backups since I can just backup my /mnt/data directory for the most part.

example from my /etc/fstab file

/mnt/data/home        /home           none    rw,bind     0 0
/mnt/data/www        /var/www        none    rw,bind     0 0
/mnt/data/mysql        /var/lib/mysql      none    rw,bind     0 0

I tried to turn off SELinux, everythings come OK, thanks Bros very much.

Everything is OK until your box gets co-opted into a botnet

because your box gets owned because you turned SELinux off.

Go learn about SELinux and turn it back on.

BTW, the CentOS box you're talking about isn't a linode, is it?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct