Results 1 to 4 of 4

Thread: USB Flash drive backup - www-data and access to /media

  1. #1
    Join Date
    Dec 2012
    Beans
    2

    USB Flash drive backup - www-data and access to /media

    Hello all,

    First ever post on any forum so apologies in advance for any newbie errors or poor etiquette.

    I am in the process developing a Ubuntu / Chrome (PHP,mysql) based kiosk application. One of the requirements is to do daily backups of the database to a USB Flash Drive. I have this working on a Windows dev system however I have hit a problem under Linux with my poor knowledge of the OS.

    I cannot figure out how to (if indeed it is possible) allow the web server access to write to the the attached USB drive? From my understanding this runs as user www-data, do I need to add this user to a Group or edit permissions somewhere?

    Any thoughts or advice greatly appreciated.

  2. #2
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,305
    Distro
    Ubuntu

    Re: USB Flash drive backup - www-data and access to /media

    What version of Ubuntu are you running? And can you just use Backup under system settings. You can setup what you want to backup, where to backup to, and how often.
    Backup.png
    My hometown on the Mississippi River.
    Using a Asus 3632QM laptop with 8gig RAM, 750gig Hybrid.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  3. #3
    Join Date
    Dec 2012
    Beans
    2

    Re: USB Flash drive backup - www-data and access to /media

    Hi irv,

    Thanks for the reply...I'm using 12.04 LTS. I'm dumping some mySQL tables in full along with parts of other tables dependant on some logic direct from PHP so I don't think backup will do it no.

    Basically need full access to the Flash Drive.

  4. #4
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,305
    Distro
    Ubuntu

    Re: USB Flash drive backup - www-data and access to /media

    I am not into scripting but I know there is a way to do this with a simple script. The information you will need to know is the USB id. When I plug in a USB the partition info is /dev/sdb1. If I use gparted this is the information on my USB drive.
    usb info.png
    Maybe someone can help with a script file to do this.
    My hometown on the Mississippi River.
    Using a Asus 3632QM laptop with 8gig RAM, 750gig Hybrid.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

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
  •