0

Let's get to the point. I always used a Windows/Linux dualboot, the first for local development. But now, I'm totally switching to Linux (Pop!_OS)

I would like to know what are the best practices to set up Xampp on Linux. I'm asking this because I've always messed up everything with file/folders permissions in the past, so this time I want to do it the right way, possibly.

I develop skins/plugins for a CMS software. The installation of this software ask me to set 0777 to some folders in order to continue, I do not have problem with that, but the thing is, that several folders are created dynamically (some files are downloaded in local when I activate some features of the CMS), and it always throw up errors for file permissions, I cannot even upload images without setting permissions every freaking time.

Someone told me to set 0777 to the entire htdocs folder, someone else told me that this is a bad practice and it is good to avoid it.

So the question is? What are the best practices in my case?

I'm ok with changing permission, but I just want to not have it every 2 minutes and for every task, simply because I've always messed up everything in the past, as I said earlier lol

Thank you in advance, have a great day y'all!

1 Answer 1

0

Those are goodies of Linux! Permission Control == Improved security.

For the Xampp part, I suggest doing a manual installation of apache2, MySQL and PHP, some Linux distro. come with apache installed! You just have to set up the remaining but if you really need a taste of XAMPP the run file from https://www.apachefriends.org/index.html will do almost all the magic for you

About 0777 permission, I wouldn't suggest setting that for the whole htdocs(www) folder, instead set that permission to folders that you know you will need to read and write to them frequently for example uploads folders and cache folder.

2
  • Thank you for the tips! That is why I absolutely love Linux, I'm just frustrated because it seems like I can't handle properly the permission part lol One more question, if you don't mind; what about folders that are created dynamically? This CMS downloads locally on my htdocs folder all the template files needed for editing on a new folder when I switch on a certain option. Is there a way to set 0777 to a folder that doesn't exist yet? Or maybe is more convenient to create a subfolder on htdocs, install the CMS there and give 0777 to it and all subfolders/files? Thank you in advance!
    – Niq
    May 1, 2020 at 9:44
  • I think good CMS will create a folder with proper permission automatically base on it needs, for special cases, CMS developer may explain in documentation which folders you have to give 0777 permission, but giving 0777 permission to every folder is not a good idea. If I am not wrong if you set 0777 to upload a folder, for example, all children folder inherit that permission even newly created one with something like this chmod g+s /path/to/parent
    – Sayd Fuad
    May 1, 2020 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.