sudo chown -R root:myusername /var/lib/php/session (what should I put in username)?

I'm getting this:

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

So I'm following this tutorial.

But I have no idea what to put in "username".

This is how it looks when I launch the terminal:

alex@alex-System-Product-Name:~$

My user is "alex", eg:

/home/alex

Any suggestions?

2 Answers

The chown command has the following syntax:

chown username:groupname directory

So in your example command it is your primary group name you need to put To determine your current user name issue the command as below on a terminal

whoami

This will return your current user name. Then issue this command to determine your group memberships

groups username

Assuming that your username is "alex", run:

groups alex

You will get something like:

alex : alex staff adm cdrom lpadmin admin

The first one after the : is your primary group. In this example it is "alex".

The command will be:

sudo chown -R root:alex /var/lib/php/session
4

That would be:

sudo chown -R root:alex /var/lib/php/session

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like