Help to update cc_config.xml on Ubuntu

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9506144014
RAC: 1231134
Topic 204226

I have done my research on adding the option to use all GPU's per the Client Configuration page on BOINC

(i.e. <use_all_gpus>1</use_all_gpus>)

and have created an updated cc_config.xml file with this added line using gedit. I have identified my BOINC data directory location as per the BOINC Event Log information and confirmed the existing config file is there.  However, the permissions for the existing cc_config.xml file do not allow me to replace it.  I have studied the Ubuntu File permissions page on the Ubuntu Wiki, but am confused, as I only wish to change the permission for this one file and it is not clear how to do it, plus I am not sure that if I do change permissions that this may possibly mess up the way BOINC functions.  Additionally, in any question I can find about changing the cc_config.xml file on Einstein@home, there is never any discussion about having to change file permissions to make the update work, they all just simply say "replace the file".  This makes me wonder if I am trying to change the wrong file, or if there is a simple method of updating the file that is escaping me.  I am using Ubuntu 16.04.

Any assistance would be appreciated !  Thanks, Richard

mountkidd
mountkidd
Joined: 14 Jun 12
Posts: 176
Credit: 12506742555
RAC: 8062608

Hopefully you have the format

Hopefully you have the format of the file correct.  it should look something like this at a minimum:

<cc_config>
  <options>
    <use_all_gpus>1</use_all_gpus>
  </options>
</cc_config>

There are several ways to change the file permissions.  The easiest is to open a terminal and cd to the directory (/etc/boinc-client) containing your cc_config.xml file.  You can use the ll command to get info about file ownership.  Ownership for your installation is most likely boinc/boinc and the permissions should be rw-rw-r--.  Use the chmod command to set file permissions.  Enter chmod 664 cc_config.xml <cr>.  If root owns the file, you will have to add a sudo in front of the chmod.

AgentB
AgentB
Joined: 17 Mar 12
Posts: 915
Credit: 513211304
RAC: 0

Richard de Lhorbe wrote:I

Richard de Lhorbe wrote:

I have done my research on adding the option to use all GPU's per the Client Configuration page on BOINC

 

(i.e. <use_all_gpus>1</use_all_gpus>)

 

and have created an updated cc_config.xml file with this added line using gedit. I have identified my BOINC data directory location as per the BOINC Event Log information and confirmed the existing config file is there.  However, the permissions for the existing cc_config.xml file do not allow me to replace it.  I have studied the Ubuntu File permissions page on the Ubuntu Wiki, but am confused, as I only wish to change the permission for this one file and it is not clear how to do it, plus I am not sure that if I do change permissions that this may possibly mess up the way BOINC functions.  Additionally, in any question I can find about changing the cc_config.xml file on Einstein@home, there is never any discussion about having to change file permissions to make the update work, they all just simply say "replace the file".  This makes me wonder if I am trying to change the wrong file, or if there is a simple method of updating the file that is escaping me.  I am using Ubuntu 16.04.

 

Any assistance would be appreciated !  Thanks, Richard

The reason there is no discussion about changing file permissions because they should not be changed!  What follows assumes you have followed a standard Ubuntu repo install.

 

What needs to change is your login privileges need to be escalated to allow these files (which do not belong to your login identity) to be overwritten.

 

There are two easy ways to do this this, the simplest, is to prefix your edit command with "sudo" as described above.  This gives you unlimited privileges on the machine, so handle with care.   You will be prompted with the password each time.

 

The second method is to add (one time) your login to the "boinc" group, which then gives your login the boinc group membership privileges, allowing changes.

I for example would do this.

sudo  adduser agentb boinc

From now on i can edit boinc files as my own.  I  always do this on my hosts, it saves time typing the same password over and over - and neater from a system administration perspective.

Further reading http://boinc.berkeley.edu/wiki/Linux_file_permissions

 

Good luck.

mmonnin
mmonnin
Joined: 29 May 16
Posts: 291
Credit: 3373166540
RAC: 2765565

I just navigate to the boinc

I just navigate to the boinc folder where cc_config file should go and type:

sudo gedit cc_config.xml

To either create the file or edit the file. Works in Ubuntu/Mint. I haven't had to modify any permissions.

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9506144014
RAC: 1231134

Thanks to all those who

Thanks to all those who commented on my question.  I thought this through over the last couple of days and independently came up with the same solution as MMONNIN has suggested above, and can confirm it works fine in Ubuntu as well.  I got misdirected by the wording of the error messages when I tried first to modify the config file and thought I had to do something about permissions, which I now realize is not the case.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.