Menu Title

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


You may also like...

Thank you for visiting us. To continue receiving updates, please Subscribe to our Social Media Channels.