Can't save edited setup.php file


I have a system setup with Linux Mint installed. I am working thru the installation instructions and am at the point of editing and saving the setup.php file. I do not have permission to save this file. Any pointers would be appreciated. Probably more of a Linux question than a CA question but I can't go forward until this is resolved.




  • The first step might be this simple command:

    ls -l

    To list the files and the details about the file which will look something like:

    drwxr-xr-x [user] [last edited] File/Folder Name

    d stands for directory

    Next three columns will be for the user. As I am looking at a folder on my personal computer, of course I am going to be able to Read, Write, and eXecute .

    The next three columns are for the group and if they can Read, Write, and eXecute. Think of this section as workgroup who are able to log into the server. For example, Charles is the owner of the file, but he would like others, such as Peggy, working on Project A to be able to edit it.

    The last three columns are the same bit of information for everyone.

    The Linux terminal commands you will want to look into are groupmod, chown, and chmod. During installation, you will need to change a couple of the folders to be able to be Readable, Writeable, and eXecuatable by everyone which you will want to look into the chmod command. The other bit of information that you will want to know is that Linux Mint is probably going to use www-data for the user and group for Apache.

    At this point you have a several of options which you might want to try or combine:

    1. The simplest one will be to run sudo nano setup.php i.e. edit the file as the root user in the text editor Nano
    2. Add the main user who will be editing providence files to www-data group and give the group level the ability to write to all of the folders
    3. Change the ownership of the files in the folder perhaps to [user]:www-data or [user]:httpd (different distros call the user:group for apache2 different names. With Mint, you should start with www-data)

    Hopefully this helps out as a jumping off point to figure out how you want to set up the server.

Sign In or Register to comment.