Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jan 04, 2009 12:34 pm 
Offline
Newbie

Joined: Sun Jan 04, 2009 12:26 pm
Posts: 2
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


Top
   
 Post subject:
PostPosted: Sun Jan 04, 2009 12:43 pm 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
Did you set the permissions on the folder to give access to the user Apache runs as?

-James


Top
   
 Post subject: selinux?
PostPosted: Sun Jan 04, 2009 2:00 pm 
Offline
Senior Member
User avatar

Joined: Thu Mar 06, 2008 12:21 am
Posts: 59
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


Top
   
 Post subject: remounting dirs
PostPosted: Sun Jan 04, 2009 2:06 pm 
Offline
Senior Member
User avatar

Joined: Thu Mar 06, 2008 12:21 am
Posts: 59
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

Code:
/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


Top
   
 Post subject:
PostPosted: Mon Jan 05, 2009 12:19 am 
Offline
Newbie

Joined: Sun Jan 04, 2009 12:26 pm
Posts: 2
I tried to turn off SELinux, everythings come OK, thanks Bros very much.


Top
   
 Post subject:
PostPosted: Fri Mar 27, 2009 4:10 pm 
Offline
Senior Newbie
User avatar

Joined: Mon Jan 26, 2009 3:06 pm
Posts: 5
Website: http://developer.notserp.com
Location: Berlin, Germany
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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group