Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Cannot connect to localhost after permission change

  1. #11
    Join Date
    Aug 2013
    Beans
    29

    Re: Cannot connect to localhost after permission change

    To answer the outstanding questions:

    a. no I did not understand what I was doing
    b. to the best of my knowledge yes www-data was the default setup

    root is the superuser
    laptop is the non-root user

    I need to be able to work as the user called "laptop".
    "laptop" needs read write - all - access to files in the /var/www/ folder or
    alternatively somehow it needs to be setup so that I can easily copy edit and move files logged in as "laptop"

    My undertstanding is that it is NOT a good idea to login and work as root. That's why I think I should use "laptop".

    WhoamI to be posted to private...

    Thank you.

  2. #12
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Cannot connect to localhost after permission change

    The default permissions are correct - only root should be able to write to /var/www and you should copy your files to that folder as root instead of loosening it's permissions.

    By default, /var/www is readable by all, but your changes stopped that. Now that you have partly rectified that by making www-data the owner, you could try restarting Apache (rebooting will do this, or use 'sudo service apache2 restart').

    You could also try adding read permission to /var/www for all, which is a default permission anyway:

    sudo chmod a+r /var/www
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  3. #13
    Join Date
    Mar 2005
    Location
    Isle of Bute, Scotland
    Beans
    369
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Cannot connect to localhost after permission change

    True. only root should have write access if it is internet facing. The OP said this is just for testing himself and will not be accessible from the internet.
    So I don't think giving write permissions to his non root user should be a problem although he should be able to write using sudo.
    Then again i might be wrong - I often am.
    Running 14.04 on my HP Pavilion g6 4 Gig Ram 320 Gig Disc

  4. #14
    Join Date
    Aug 2013
    Beans
    29

    Re: Cannot connect to localhost after permission change

    WOW!
    linuxonbute did an outstanding job on the fix. Case closed, with THANKS!

Page 2 of 2 FirstFirst 12

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
  •