Results 1 to 8 of 8

Thread: Gentoo: Apache not able to write to the NFS folder, showing file size zero every time.

  1. #1
    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.

  2. #2
    Join Date
    Jun 2011
    Posts
    484

    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.

  3. #3
    Join Date
    May 2008
    Posts
    250

    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.
    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

  4. #4
    Join Date
    Jun 2011
    Posts
    383

    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.

  5. #5
    Join Date
    Jul 2011
    Posts
    350

    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.

  6. #6
    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.

  7. #7
    Join Date
    Jul 2011
    Posts
    352

    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.

  8. #8
    Join Date
    Jul 2011
    Posts
    322

    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.

Similar Threads

  1. Permission error into apache var/www folder on Linux mint
    By X-MaaN in forum Operating Systems
    Replies: 5
    Last Post: 05-07-2011, 11:11 AM
  2. Unable to mount root partition as read-write in gentoo
    By Ikrama in forum Operating Systems
    Replies: 5
    Last Post: 30-05-2011, 08:12 PM
  3. Replies: 5
    Last Post: 25-01-2011, 08:10 AM
  4. DVD RAM showing write protected error
    By Lishi in forum Hardware Peripherals
    Replies: 3
    Last Post: 03-08-2009, 10:21 PM
  5. Issue with Explorer not showing file & folder names
    By Jabeen in forum Customize Desktop
    Replies: 3
    Last Post: 28-07-2009, 12:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,675,278.47391 seconds with 16 queries