Setting up FTP permissions in XAMPP for Linux
XAMPP for Linux (aka LAMPP) package contains proftpd server, which is quite a stable and highly configurable FTP server. It is GPL-licensed, capable of serving large files, supports hidden directories, virtual hosts and per-directory “.ftpaccess” files, Advanced features like multiple authentication methods and upload/download ratios etc.
proftpd uses a single main configuration file which is located in “/opt/lampp/etc/proftpd.conf”. LAMPP configures the ftp server with a user called “nobody”, which is a fake account and doesn’t really exist. The password for this user can be changed by running the security utility of LAMPP i.e. “/opt/lampp/lampp security”.
When you create or upload files, there’ll be a default set of permissions applied to these files, that restricts access to other users. If you open the directory you’ve created in Nautilus, you can’t read/edit the contents. You can change these default set of permissions by editing the proftpd.conf file. You can also change the default directory of the ftp login.
sudo gedit /opt/lampp/etc/proftpd.conf
Change the directory to whatever you want to be redirected to when you login to ftp server.
# Normally, we want files to be overwriteable.
<Directory /home/ashok/xampp/*>
AllowOverwrite on
</Directory>
# only for the web servers content
DefaultRoot /home/ashok/xampp
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
Umask is the method used by proftpd, which is like an opposite to chmod. CHMOD 777 adds all permissions to files and directories (adds read, write capabilities) where as UMASK 777 removes all permissions from the files and directories. So, if you want the uploaded/created files to be accessed by everyone else, you have to use umask 000. More info about these permissions at: link