sudo /opt/lampp/lampp start
[sudo] password for cafe:
Starting XAMPP for Linux 1.8.3-4...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
With proftpd default user daemon & pw xampp, client machine login to xampp server, directory is /opt/lampp/htdocs/ only, through the ftp, I can't create directory, also can't upload any file, it says:
550 /drupal/greeting.php: Permission denied
Then I did a ssh login to the server, sudo created the directory, and chmod to 777, then I can upload, read, write and delete files, but, 777 is not what I want. And I found the directory owner is root:root, but uploaded files into it becoming daemon:daemon. I created a soft link of the directory into a user's home (/home/cafe/), cd into it and created a php file, then found the file owner bacome cafe:cafe, the new created php file can be shown on the browser, these above progresses were all done on the server side.
I'm wonder how to do create directories & files, upload & delete processes via ftp and avoid 777 permission?