Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 899  / 3 Years ago, sun, august 29, 2021, 12:05:54

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).



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


Also, I tried to use the following and it copies just fine:



sudo -u www-data cp '/media/v2.0tb/path/to/file' '/media/v2.0tb/path/to/newfile'


What I failed to notice all this time is that the string I was passing to my copy/rename function had a space in it and wasn't encapsulated in " as it should have been due to loose type casting of php.



Thanks for all of the help!


More From » 10.10

 Answers
2

First of all: you don't have to reformat anything.



I'd suggest the following setup for your fstab entries:



UUID=X /media/<path> ntfs-3g uid=<your username>,gid=<a group containing www-data>,umask=007 0 0


umask=007 sets the permissions to rwx (read, write, execute) for both group(www-data) and user (you).


[#41555] Monday, August 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oargrou

Total Points: 336
Total Questions: 105
Total Answers: 113

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
oargrou questions
Thu, May 13, 21, 16:38, 3 Years ago
Wed, Jul 21, 21, 01:38, 3 Years ago
Sat, May 15, 21, 17:39, 3 Years ago
Tue, May 24, 22, 14:58, 2 Years ago
Sat, Mar 19, 22, 05:22, 2 Years ago
;