title: Ubuntu Xampp PHP File Permissions with NTFS Hdd's as additional media storage
body: <p>I have 4 drives in my (yes, physically in the box, sata connected) Ubuntu 10.10 system with xampp installed at the /opt/lampp/ dir on the OS drive. The OS drive (ssd, lets call it drive1 for sanity) has the correct file permissions to allow for PHP (user www-data) to read/write to any of my htdocs and vhosts folder(s).</p>
  
  <p>My problem comes with I try to move a file that exists on one of the other 3 drives. Each of my other drives are ntfs (1tb, 1.5tb and 2.0tb) and mounted with fstab. When I view the file permissions with the gui (nautilus) it says that everything is root. So I tried chown, chmod, etc. I found out that you can't change the permissions of ntfs with those commands. So I went to my fstab config, however I can't get those permissions set to allow for PHP to copy/rename/move a file within even one of the drives.</p>
  
  <p>I updated to using the UUID's today, the drives are also shared on my local network and that still works just fine.</p>
  
  <p>I changed to the ntfs-3g driver after installing, restarted the machine but I'm still not able to have php move a file. </p>
  
  <p>Here is my fstab file:
      UUID=552A7C6B05CEAAD2   /media/v1tb ntfs-3g defaults,uid=1000 0 0
      UUID=DE58539158536775   /media/v1.5tb   ntfs-3g defaults,uid=1000 0 0
      UUID=3D80C54D5D100280   /media/v2.0tb   ntfs-3g defaults,uid=1000 0 0</p>
  
  <p>Also, I tried to use the following and its working just fine:</p>
  
  <pre><code>sudo -u www-data cp '/media/v2.0tb/path/to/file' '/media/v2.0tb/path/to/newfile'
  </code></pre>
  
  <p>How does imitating a user work, but php's rename/copy functions won't work?</p>
  
  <p>How can I set the php user (www-data) to allow for copying/renaming/deleting files and directories on these ntfs drives? Do I have to reformat them?</p>