Find the answer to your Linux question:
Results 1 to 2 of 2
I switch between Windows and Linux a lot so I have most of my files on a FAT32 partition, including the stuff I use for web development. This works fine ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    1

    Can't redirect /var/www to FAT32 partition


    I switch between Windows and Linux a lot so I have most of my files on a FAT32 partition, including the stuff I use for web development. This works fine for WAMP, but LAMP doesn't like it. This is probably because the partition can only be accessed by the owner, but I can't figure out how to change that.

    This is what I have in my fstab:

    Code:
    /dev/sda5 /media/X      vfat    rw,unmask=000   0       0
    Can anyone help? I've tried googling around, but I can't figure this out.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,173
    Well, one method is for root to change the permissions for the files/directories on this device. Because it is a fat device, the changes are only made in memory, but they will allow non-root users to access the device and modify/add/remove files on it.

    1. chmod ugo+rwx /media/X
    2. find /media/X -type d -exec chmod ugo+rwx {} \;
    3. find /media/X -type f -exec chmod ugo+rw {} \;

    Put these commands in a script and execute it with sudo, or sudo each command. Voila, anyone can access the FAT32 partition.

    There may be better methods to accomplish this (I am always interested in better ways to solve problems), but it does work, even if it is a bit Q&D (Quick and Dirty)...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •