Thursday, November 18, 2021

[SOLVED] Permission in linux using xampp and wordpress

Issue

I'm trying to move more and more to linux, and i have some problem with the developement of my website locally with wordpress.

Everything went fine with installing wordpress and xampp. But now, if i want to install new themes or upload picture to my website, not using nemo in sudo mode (i'm using linux mint) the website is not allowed to write anything (the website is in /opt/xampps (something like that) ). I know that it's linux permission restriction.

Is there a way to allow writting permanently in a folder or something like that in linux ?

Thank you in advance


Solution

/u/Prabu 's answer has the right idea, but there is no reason to use 0777. It opens your directory up to attacks unnecessarily. Use 0755 instead.

chmod -R 0755 [your xampp directory]

0777 gives read, write and execute access to the directory to everyone who can get to it. 0755 gives read, write and execute access to only the folder owner (you!) and read/execute access to whatever group owns and the rest of the world. The important point is that it denies the world at large the ability to save files into your directory.

Here's a good summary of file permssions. It isn't super complicated, so you may as well take a few minutes to familiarize yourself with it since you're a Linux user: http://www.csit.parkland.edu/~smauney/csc128/permissions_and_links.html



Answered By - vlasits