Results 1 to 5 of 5

Thread: LAMP secure?

  1. #1
    Join Date
    Apr 2013
    Beans
    2

    LAMP secure?

    Hi guys!

    I downloaded a LAMP and then couldn't save a file in it's server documents folder; I got a permission denied error.

    I then did a scan with my security program and it found a virus! I thought I got rid of it, but still couln't save to the server's documents folder. However, I also went to a 'suspicous' site but am not sure if that did it.

    Thanks for any help here!

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: LAMP secure?

    Which directory are you trying to save a file to? The server install doesn't have a /home/$USER/Documents directory.

  3. #3
    Join Date
    Apr 2013
    Beans
    2

    Re: LAMP secure?

    Sorry for saying documents...the directory was home/var/www.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: LAMP secure?

    Huh? By default you shouldn't have write access to anything outside of your home directory.

    If you have the document root for Apache set for /home/var/www, when you'd either have you add yourself to the www-data group, or mess with permissions.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: LAMP secure?

    Hi

    Usually, you cannot write to any directory outside of you home directory.

    This is by design and is part of Ubuntu's security model.

    This is why you cannot write to /var/www

    You can only create, move, rename, delete and edit files outside of your home directory by gaining elevated privileges. This requires the use of sudo and gksudo.

    Read these documents.

    https://help.ubuntu.com/community/FilePermissions

    https://help.ubuntu.com/community/RootSudo

    http://www.psychocats.net/ubuntu/graphicalsudo

    Now you've read those documents to move files into /var/www, open a terminal and type

    Code:
    gksudo nautilus
    Enter your password. You can now copy files into /var/www, When you have finished close nautilus.

    You can also press ALT + F2 and type

    Code:
    gksudo nautilus
    to do the same thing.

    This assumes you are using Ubuntu and not xubuntu or lubuntu.

    Read up on file permissions and privileges. They are central to how Ubuntu's filing system works.

    Kind Reagrds
    Last edited by matt_symes; April 22nd, 2013 at 04:04 AM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

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
  •