Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 27-02-2012
Member
 
Join Date: Jan 2012
Posts: 46
Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

Recently I have mounted a folder from the Server 1to Server 2 to the media folder which was placed in document root of the Apache web server and it was installed on Server 2. When Apache is supposed to write the file to where the folder has been mounted there is no content has been written in the file. I am getting file size to zero. Do you aware of any specific solution to fix the matter let me know as early as possible.
Reply With Quote
  #2  
Old 27-02-2012
Member
 
Join Date: Jun 2011
Posts: 482
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

After going through the problem which you have stated over here I am suspecting that you are getting an issue with Unix permissions. You will need to edit the files manually on your computer. if you have installed Ubuntu on your computer then you have to edit editing /etc/apache2/envvars and make following changes APACHE_RUN_USER and APACHE_RUN_GROUP to the user and group of yours.
After that you have to run? /etc/init.d/apache2 restart ?.
Let me know whether the above mentioned thing is working or not.
Reply With Quote
  #3  
Old 27-02-2012
Member
 
Join Date: May 2008
Posts: 246
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

Hey thanks a lot for the prompt replies of yours. I have installed CentOS 5.4 and I was not able to locate the files which you have stated over here. I tried to edit the above mentioned thing from apache config file. But when I tried to start Apache it was prompting with below mentioned error message.
Quote:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n
Reply With Quote
  #4  
Old 27-02-2012
Member
 
Join Date: Jun 2011
Posts: 380
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

To get the better idea of the problem I would like to have log file. So I recommend that you should move to /var/log/httpd/error.log directory and post if you are having any log file.
Reply With Quote
  #5  
Old 27-02-2012
Member
 
Join Date: Jul 2011
Posts: 348
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

To test the situation whether Apache is able to write or not. You should log in to Apache and writing the test file.
You can do that by using below mentioned code.
Code:
su - www -s /bin/bash
once you have done you have to write the test file to the NFS share.
Reply With Quote
  #6  
Old 27-02-2012
Member
 
Join Date: Jan 2012
Posts: 46
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

Again I wanted to say thanks a lot for helping me out. I was able to create the file by using the command touch. In fact I am not able to edit and save the content of the file by using VI editor. Is there any way to set the permission for apache so that it can write to that particular partition.
Reply With Quote
  #7  
Old 27-02-2012
Member
 
Join Date: Jul 2011
Posts: 347
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

Ok I got the thing the issue which you have mentioned over here is not happening because of the write permission. Since you was able to write to the partition by using vi. So there is nothing to do with user permission.
Reply With Quote
  #8  
Old 27-02-2012
Member
 
Join Date: Jul 2011
Posts: 319
Re: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

Do you checked selinux?
Code:
sestatus
in case it is enabled then you should try to setting permissive and try the same again by using following.
Code:
setenforce permissive
you should try it on both the server as well as client.
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Gentoo: Apache not able to write to the NFS folder, showing file size zero every time."
Thread Thread Starter Forum Replies Last Post
Permission error into apache var/www folder on Linux mint X-MaaN Operating Systems 5 05-07-2011 11:11 AM
Unable to mount root partition as read-write in gentoo Ikrama Operating Systems 5 30-05-2011 08:12 PM
Search according to File Size, Date & Contents at a time on Windows 7 Brexton Operating Systems 5 25-01-2011 08:10 AM
DVD RAM showing write protected error Lishi Hardware Peripherals 3 03-08-2009 10:21 PM
Issue with Explorer not showing file & folder names Jabeen Customize Desktop 3 28-07-2009 12:03 PM


All times are GMT +5.5. The time now is 02:29 AM.