I'm a newbie and I have installed Linux Mint (x64 Ubuntu-based) and Apache v2.0, PHP 5.5.9 and MySQL.

Then I installed WordPress and I was almost unable to upload and edit files (I got "Permission denied")

Now I have two questions:

  • How I can allow PHP for accessing filesystem easily?
  • I've tried removing password with $ sudo passwd -d ehsaan now password isn't removed, but password has been changed and I can't access $ sudo, even I tried my password, but I doesn't accept.

closed as off-topic by Eric Carvalho, muru, ppetraki, Eliah Kagan, Kaz Wolfe Sep 29 '14 at 20:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Eric Carvalho, muru, ppetraki, Eliah Kagan, Kaz Wolfe
If this question can be reworded to fit the rules in the help center, please edit the question.

  • @DavidFoerster Thank you, but how I can restore my password? – Ehsaan Sep 21 '14 at 19:09
  • Please see my newly created answer for that. – David Foerster Sep 22 '14 at 12:33

passwd has nothing to do with (file system) permissions. The former manages authentication data, the latter is a form of authorisation record.

Rectify web server permissions

Take a look at the ownership and read permissions of the directory subtree of your WordPress installation. They need to be readable by the user the web server runs as.

Reset deleted (super-)user password

I recommend you consult How do I reset a lost administrative password? for that.

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