Announcement

Collapse
No announcement yet.

[SOLVED] setting permissions on /var/www

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] setting permissions on /var/www

    Hello,

    I installed hardy server. I get an error from my php scripts fopen() permission denied.
    Exactly what are the commands I need to
    1) enable apache to read/write to /var/www and
    2) enable myself (jean) to write there (I don't like to chmod files everytime I create something).

    Probably some chown stuff but what exactly?

    Thanks.

    Info:

    Code:
    jean@server:~$ l /var/www
    total 26316
    -rwxr-xr-x 1 nobody nogroup  475 2006-06-18 22:51 404.html
    -rwxr-xr-x 1 nobody nogroup  766 2000-08-09 18:50 favicon.ico
    -rwxr-xr-x 1 nobody nogroup  711 2008-07-27 04:21 .htaccess
    etc.
    contents of /etc/apache2/envvars
    Code:
    export APACHE_RUN_USER=www-data
    export APACHE_RUN_GROUP=www-data
    export APACHE_PID_FILE=/var/run/apache2.pid
    Greetings from Groningen Netherlands

    #2
    Re: setting permissions on /var/www

    *bump*
    Greetings from Groningen Netherlands

    Comment


      #3
      Re: setting permissions on /var/www

      According to this thread: http://ubuntuforums.org/showthread.php?t=556819 you could consider doing:

      Code:
      chmod -R 755 /var/www
      However, you want to make sure you don't have exploitable code on any of your sites because it could be a security risk.

      You could also look here: http://www.linuxforums.org/forum/ser...s-var-www.html which details some of the user/group details you might need to setup.

      Comment


        #4
        Re: setting permissions on /var/www

        Thanks Nate.

        It's solved.
        http://ubuntuforums.org/showthread.p...15#post5606815
        Greetings from Groningen Netherlands

        Comment

        Working...
        X