Create permission in local XAMPP server in Ubuntu

In Linux, root or the privileged user that you specify during the XAMPP installation, becomes the owner of all the files and folders . Thus, root account owns htdocs and prevents any other user to write or read your application hosted inside htdocs.

How to assign Permission in XAMPP htdocs folder in Ubuntu

Change the ownership of htdocs

If we change the ownership of a file or folder, the new owner will automatically get the write permission. Use $ whomai command to know the logged in username (in this case, username is ap).

$ sudo chown $USER:ap /opt/lampp/htdocs

Ubuntu Permission chown local sever folder

Use following command ls -lstrd to review your changes to ensure that the new user becomes root of the htdocs folder.

$ ls -lstrd /opt/lampp/htdocs

Ubuntu View Permission chown local sever folder

HostGator $2.75 per month
HostGator
24/7/365 Technical Support, Free Site Building Tools, 4500 Website Templates, Free Shopping Cart Software, Ideal for WordPress, 45 Day Money Back Guarantee