mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #3067] help,frpc.service start 提示frpc.service: Main process exited, code=exited, status=203/EXEC #2455
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2455
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @movno1 on GitHub (Aug 21, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3067
Describe the feature request
环境:
frp0.44
almaliunx9.0
1、问题:frp客户端打包成一个服务后,无法启动 vi /etc/systemd/system/frpc.service
frpc.service start 提示frpc.service: Main process exited, code=exited, status=203/EXEC
2、临时解决办法:
测试了各种办法都不行,如果 临时关闭selinux 就正常了,frp客户端就可以启动了,说明还是selinux原因导致的,请教怎么在不关闭selinux的情况下解决这个问题?
3、详细内容:
pc端将frp做一个自动启动,frp
内容:[Unit]
Description=frpc daemon
After=syslog.target network.target
Wants=network.target
[Service]
User=root
Type=simple
ExecStart=/home/nat/nat/frpc -c /home/nat/nat/frpc.ini
[Install]
WantedBy=multi-user.target
但是启动的时候提示:
× frpc.service - frpc daemon
Loaded: loaded (/etc/systemd/system/frpc.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2022-08-21 13:45:22 CST; 3min 15s ago
Process: 5142 ExecStart=/home/nat/nat/frpc -c /home/nat/nat/frpc.ini (code=exited, status=203/EXEC)
Main PID: 5142 (code=exited, status=203/EXEC)
CPU: 1ms
8月 21 13:45:22 localhost.localdomain systemd[1]: Started frpc daemon.
8月 21 13:45:22 localhost.localdomain systemd[5142]: frpc.service: Failed to locate executable /home/nat/nat/frpc: Permission denied
8月 21 13:45:22 localhost.localdomain systemd[5142]: frpc.service: Failed at step EXEC spawning /home/nat/nat/frpc: Permission denied
8月 21 13:45:22 localhost.localdomain systemd[1]: frpc.service: Main process exited, code=exited, status=203/EXEC
8月 21 13:45:22 localhost.localdomain systemd[1]: frpc.service: Failed with result 'exit-code'.
——————————————————————————————————————————
目录权限是没有问题的,我把所有的权限都给了也不行
[root@localhost nat]# ll
总用量 24488
-rwxrwxrwx. 1 1001 121 10997760 7月 11 00:15 frpc
-rwxrwxrwx. 1 1001 121 10934 7月 11 00:19 frpc_full.ini
-rwxrwxrwx. 1 1001 121 155 8月 21 13:28 frpc.ini
-rwxrwxrwx. 1 1001 121 14036992 7月 11 00:15 frps
-rwxrwxrwx. 1 1001 121 5686 7月 11 00:19 frps_full.ini
-rwxrwxrwx. 1 1001 121 26 7月 11 00:19 frps.ini
-rwxrwxrwx. 1 1001 121 11358 7月 11 00:19 LICENSE
——————————————————————————————
测试了各种办法都不行,如果 临时关闭selinux 就正常了,frp客户端就可以启动了,说明还是selinux原因导致的,请教怎么在不关闭selinux的情况下解决这个问题?
[root@localhost nat]# setenforce 0
[root@localhost nat]# systemctl start frpc
[root@localhost nat]# systemctl status frpc
● frpc.service - frpc daemon
Loaded: loaded (/etc/systemd/system/frpc.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2022-08-21 14:01:03 CST; 6s ago
Main PID: 10795 (frpc)
Tasks: 5 (limit: 4975)
Memory: 7.0M
CPU: 11ms
CGroup: /system.slice/frpc.service
└─10795 /home/nat/nat/frpc -c /home/nat/nat/frpc.ini
8月 21 14:01:03 localhost.localdomain systemd[1]: Started frpc daemon.
8月 21 14:01:03 localhost.localdomain frpc[10795]: 2022/08/21 14:01:03 [I] [service.go:349] [35eee997c82257df] login to server success, get run id >
8月 21 14:01:03 localhost.localdomain frpc[10795]: 2022/08/21 14:01:03 [I] [proxy_manager.go:144] [35eee997c82257df] proxy added: [101ssh]
8月 21 14:01:03 localhost.localdomain frpc[10795]: 2022/08/21 14:01:03 [I] [control.go:181] [35eee997c82257df] [101ssh] start proxy success
Describe alternatives you've considered
No response
Affected area
@Becods commented on GitHub (Aug 22, 2022):
尝试使用非root用户启动frp服务进程
@github-actions[bot] commented on GitHub (Sep 22, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.