FahCore and FAHClient running with root privileges
Moderators: Site Moderators, FAHC Science Team
FahCore and FAHClient running with root privileges
Hi!
I just downloaded the Debian fahclient package and installed it. The program started folding with no further setup, but with root privileges, not using a fahclient user as the install guide says. Can this be changed? Is there a work-around?
I just downloaded the Debian fahclient package and installed it. The program started folding with no further setup, but with root privileges, not using a fahclient user as the install guide says. Can this be changed? Is there a work-around?
Re: FahCore and FAHClient running with root privileges
First run these two commands (without sudo if you are in a root shell):
Create a file called
/etc/systemd/system/FAHClient.service
(use that exact filename to make sure it pre-empts the init.d script)
with the following content:
Then reboot and run the commands
That should let you run the service in way that uses the right user (fahclient) and still has acess to the GPUs.
Code: Select all
sudo adduser fahclient video
sudo adduser fahclient render
/etc/systemd/system/FAHClient.service
(use that exact filename to make sure it pre-empts the init.d script)
with the following content:
Code: Select all
[Unit]
Description=Folding@Home Client
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/FAHClient /etc/fahclient/config.xml --pid-file=/var/run/fahclient/fahclient.pid --daemon
PIDFile=/var/run/fahclient/fahclient.pid
User=fahclient
RuntimeDirectory=fahclient
WorkingDirectory=~
[Install]
WantedBy=multi-user.target
Code: Select all
sudo systemctl start FAHClient.service
sudo systemctl enable FAHClient.service
Online: GTX 1660 Super + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 1050 Ti 4G OC, RX580
Re: FahCore and FAHClient running with root privileges
Thanks!
I tried the rest and it worked
This machine doesn't have a GPU slot, so I assume this is not needed.gunnarre wrote:First run these two commands (without sudo if you are in a root shell):Code: Select all
sudo adduser fahclient video sudo adduser fahclient render
I tried the rest and it worked
-
- Site Moderator
- Posts: 6394
- Joined: Sun Dec 02, 2007 10:38 am
- Location: Bordeaux, France
- Contact:
Re: FahCore and FAHClient running with root privileges
It's a bug introduced in v7.6.21 installer ...
Re: FahCore and FAHClient running with root privileges
Hello folders,
Many thanks,
leloft
This is my first post to the forum. I am running Devuan Chimaera on several machines and I'd like to use the lab ones for folding@home. I have difficulties installing the fahcontrol and fahviewer packages, although fahclient is running and folding its 19th WU. However, the client is running with root privileges and I am unable to find a 'don't download a new WU so that I can reinstall fahclient' button (obviously I am describing a function not an actual button title!) so at the end of this WU, I'm going to stop folding via Web Control and uninstall the fahclient, with a view to installing a version that doesn't have the python2 dependencies. My questions are these: which version should I download and install and how do I follow the above procedure for a sysVinit system to ensure that the client doesn't run as root?toTOW wrote:It's a bug introduced in v7.6.21 installer ...
Many thanks,
leloft
Re: FahCore and FAHClient running with root privileges
Replying to my own (as yet uncleared by mods) post. Found solution for the issue about root privileges. I uninstalled v7.6.21 and installed v7.6.13 and rebooted. FAHCore and FAHClient now running as user fahclient. However, have issue with Web Control: used 'Stop folding after WU finished' option in the 'stop folding' button, but now I cannot see a toggle option i.e. to download a new WU and continue folding after the current one is finished. I'd prefer to use some kind of terminal interface via ssh if I could, but I'm caught up in this python2/Debian 10 issue.
leloft
leloft
-
- Site Admin
- Posts: 7988
- Joined: Tue Apr 21, 2009 4:41 pm
- Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2 - Location: W. MA
Re: FahCore and FAHClient running with root privileges
The Python 2 decencies exist in all versions of the version 7 client, specifically in FAHControl. Other developers have taken the open source code for FAHControl and provided an updated version that will use Python 3. Links to that have been posted here before.
There will not be an official distribution of a fixed FAHControl for version 7. They are currently working on a version 8 client, that may be released for beta testing later this year or early next year.
There will not be an official distribution of a fixed FAHControl for version 7. They are currently working on a version 8 client, that may be released for beta testing later this year or early next year.
iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Re: FahCore and FAHClient running with root privileges
Thank you for the information.
leloft
leloft
-
- Site Admin
- Posts: 7988
- Joined: Tue Apr 21, 2009 4:41 pm
- Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2 - Location: W. MA
Re: FahCore and FAHClient running with root privileges
I located a post with the download location for the updated FAHControl that uses Python 3 - https://github.com/cdberkstresser/fah-control
iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Re: FahCore and FAHClient running with root privileges
Is a non-gui fahcontrol planned? I run fahclient in a headless machine (through ssh) and, lacking fahcontrol, I can't see what project I'm currently computing for, nor does it appear in my statistics page, like it does in boinc projects.Joe_H wrote:There will not be an official distribution of a fixed FAHControl for version 7. They are currently working on a version 8 client, that may be released for beta testing later this year or early next year.
Re: FahCore and FAHClient running with root privileges
Unfortunately queie-info isn't pretty printed, but this may help:
Also, you could have a look at HFM.
My server running home-build status pages telnets to my folding clients and executes those queue-info and slot-info commands. To do so, you'll have to set up access control in the config.xml file (there's info on that on the forum, or if you want I can post an example).
Code: Select all
root@fah1:/etc/fahclient# /usr/bin/FAHClient --send-command queue-info
06:45:52:Connecting to 127.0.0.1:36330
PyON 1 units
[
{"id": "02", "state": "RUNNING", "error": "NO_ERROR", "project": 18420, "run": 51, "clone": 3, "gen": 34, "core": "0xa8", " unit": "0x0000000300000022000047f400000033", "percentdone": "86.70%", "eta": "5 hours 30 mins", "ppd": "310045", "creditestim ate": "534326", "waitingon": "", "nextattempt": "0.00 secs", "timeremaining": "8.51 days", "totalframes": 100, "framesdone": 86, "assigned": "2022-03-22T18:59:51Z", "timeout": "2022-03-29T18:59:51Z", "deadline": "2022-04-01T18:59:51Z", "ws": "129.32. 209.203", "cs": "129.32.209.201", "attempts": 0, "slot": "00", "tpf": "24 mins 49 secs", "basecredit": "255850"},
{"id": "01", "state": "RUNNING", "error": "NO_ERROR", "project": 17768, "run": 41, "clone": 0, "gen": 111, "core": "0x22", "unit": "0x000000000000006f0000456800000029", "percentdone": "31.64%", "eta": "41 mins 01 secs", "ppd": "3062403", "creditest imate": "127600", "waitingon": "", "nextattempt": "0.00 secs", "timeremaining": "1.99 days", "totalframes": 100, "framesdone" : 31, "assigned": "2022-03-24T06:26:21Z", "timeout": "2022-03-25T06:26:21Z", "deadline": "2022-03-26T06:26:21Z", "ws": "128.1 74.73.74", "cs": "128.252.203.14", "attempts": 0, "slot": "01", "tpf": "36.00 secs", "basecredit": "21361"}
]
---
root@fah1:/etc/fahclient# /usr/bin/FAHClient --send-command slot-info
06:47:05:Connecting to 127.0.0.1:36330
PyON 1 slots
[
{
"id": "00",
"status": "FINISHING",
"description": "cpu:10",
"options": {"cpus": 10, "paused": False},
"reason": "",
"idle": False
},
{
"id": "01",
"status": "RUNNING",
"description": "gpu:7:0 GA104 [GeForce RTX 3060 Ti Lite Hash Rate]",
"options": {"pause-on-start": True, "paused": False, "pci-bus": "7", "pci-slot": "0"},
"reason": "",
"idle": False
}
]
---
My server running home-build status pages telnets to my folding clients and executes those queue-info and slot-info commands. To do so, you'll have to set up access control in the config.xml file (there's info on that on the forum, or if you want I can post an example).
Ryzen 9800X3D / RTX 4090 / Windows 11
Ryzen 5600X / RTX 3070 Ti / Ubuntu 22.04
Ryzen 5600 / RTX 3060 Ti / Windows 11
-
- Site Admin
- Posts: 7988
- Joined: Tue Apr 21, 2009 4:41 pm
- Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2 - Location: W. MA
Re: FahCore and FAHClient running with root privileges
I don't know full details, based on what is visible on the GitHub public repositories there will be a web GUI similar to the current Web Control and a background client. I have not looked deeper into the actual code posted publicly. They may publish an API like what exists for the current client for connecting third party apps to the client, but will have to see what gets posted as they get further along.BDA wrote:Is a non-gui fahcontrol planned? I run fahclient in a headless machine (through ssh) and, lacking fahcontrol, I can't see what project I'm currently computing for, nor does it appear in my statistics page, like it does in boinc projects.Joe_H wrote:There will not be an official distribution of a fixed FAHControl for version 7. They are currently working on a version 8 client, that may be released for beta testing later this year or early next year.
iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Re: FahCore and FAHClient running with root privileges
Please don't run old versions of the client, due to security. See the solution further up in the thread for how to run the client as the fahclient user rather than root.leloft wrote:Found solution for the issue about root privileges. I uninstalled v7.6.21 and installed v7.6.13 and rebooted.
Online: GTX 1660 Super + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 1050 Ti 4G OC, RX580
-
- Site Moderator
- Posts: 6394
- Joined: Sun Dec 02, 2007 10:38 am
- Location: Bordeaux, France
- Contact:
Re: FahCore and FAHClient running with root privileges
No, but you can control your headless client remotely from a machine that has FAHControl (or HFM) installed.BDA wrote:Is a non-gui fahcontrol planned? I run fahclient in a headless machine (through ssh) and, lacking fahcontrol, I can't see what project I'm currently computing for, nor does it appear in my statistics page, like it does in boinc projects.