How do I edit php.ini if I don't have permission?

Linode Staff

I need to change value in php.ini, but I do not have permission to edit the file. Can Linode make a change for me?

2 Replies

As we are primarily an infrastructure provider, we are not able to login to your Linode and view it's logs, or perform any troubleshooting on your behalf. That said, php.ini is not editable by any user other than 'root'. To edit this file, you can add sudo to the beginning of your command. I've added a couple of examples below:

sudo vi php.ini
sudo nano php.ini

When using the sudo command, you will be prompted for your password. This is the same password used to login to the Linode. By opening the file as root/sudo, you will be able to make and save changes to the file.

You can also try logging in directly as the root user to make the changes. In this case, you would not need to use the sudo command.

If you don't know the location of your php.ini file, you can use the following command to output its filepath:

find /etc -name php.ini

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct