How to change folder permissions to read, write and execute
For settings permissions you need the command chmod
.
The following permissions are enough for files: sudo chmod 664 /opt/lampp/htdocs/myfirstfile.php
inside a directory.
For directories sudo chmod 775 /opt/lampp/htdocs
is enough.
You can add -R
as an option to set it from where you are and everything below but please do not open permission more than needed (even though the creator of XAMPP does not care for security).
And please use the native LAMP stack. It is a bit harder to master but it does have a decent security out of the box.
Related videos on Youtube
Bharat
Updated on September 18, 2022Comments
-
Bharat over 1 year
I installed XAMPP, but I'm not able to create or save files in htdocs folder. This is what I get to see when I try to save a file.
The document could not be saved, as it was not possible to write to /opt/lampp/htdocs/myfirstfile.php.
Check that you have write access to this file or that enough disk space is available.
-
Bharat over 11 yearsacer@ubuntu:~$ chmod 775 /opt/lampp/htdocs chmod: changing permissions of `/opt/lampp/htdocs': Operation not permitted :(
-
Rinzwind over 11 yearsdo not forget sudo ;) @DelinquentMenace
-
Joren over 10 yearsYou should do 755 instead of 775, you don't want your security breached in 2 seconds.